SHARE
TWEET

Untitled

a guest Jun 16th, 2019 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @list.each_with_index do |item, idx|
  2.   if((idx + 1) % 6 == 0)
  3.     # Insert ad partial
  4.   end
  5.   # Print out each object in the list
  6. end
  7.      
  8. > list = [1,2,3]
  9. #⇒ [1, 2, 3]
  10. > list[1...1] = 0 # insert at position 1
  11. > list
  12. #⇒ [1, 0, 2, 3]
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top