Class: Array

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

Instance Method Summary collapse

Instance Method Details

#/(len) ⇒ Object



116
117
118
119
120
121
122
123
# File 'lib/elekk/armory.rb', line 116

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