Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/enumerable.rb
Overview
module Enumerable
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#/(len) ⇒ Object
40 41 42 43 44 45 46 47 |
# File 'lib/enumerable.rb', line 40 def / len a = [] each_with_index do |x,i| a << [] if i % len == 0 a.last << x end a end |