Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/intermine/query.rb
Instance Method Summary collapse
- #every(count) ⇒ Object (also: #/)
Instance Method Details
#every(count) ⇒ Object Also known as: /
29 30 31 32 33 34 35 36 |
# File 'lib/intermine/query.rb', line 29 def every(count) chunks = [] each_with_index do |item, index| chunks << [] if index % count == 0 chunks.last << item end chunks end |