Added Enumerable#group #7803

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants

This method groups a collection into arrays of a certain amount of
elements and returns an array of those groups.

Vinny Diehl
Added Enumerable#group
This method groups a collection into arrays of a certain amount of
elements and returns an array of those groups.
Contributor

beerlington commented Sep 30, 2012

It seems like it would be easily confused with Array#in_groups_of, which basically does the same thing but lets you pad the remaining slots instead of dropping them.

Owner

rafaelfranca commented Oct 1, 2012

Thank you for the pull request but I think we don't need to add this method to Rails since we have Array#in_groups_of

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment