Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/emaily/emaily.rb

Instance Method Summary collapse

Instance Method Details

#/(len) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/emaily/emaily.rb', line 6

def / len
  a = []
  each_with_index do |x,i|
    a << [] if i % len == 0
    a.last << x
  end
  a
end