src code

instance method Enumerable#eachSlice

Enumerable#eachSlice(number[, iterator = Prototype.K[, context]]) → Enumerable

Groups items into chunks of the given size. The final "slice" may have fewer than number items; it won't "pad" the last group with empty values. For that behavior, use Enumerable#inGroupsOf.