Categories: None [Edit]

array_groups

https://rubygems.org/gems/array_groups
https://github.com/MrMicrowaveOven/array_groups
[1,2,3,4,5].in_groups(2) => [ [1,2,3], [4,5] ] ------------------------------------------------------- [1,2,3,4,5].in_groups_of(2) => [ [1,2], [3,4], [5] ] ------------------------------------------------------- [1,2,3,4,5].in_groups_of(2, nil_fill: true) => [ [1,2], [3,4], [5,nil] ] ------------------------------------------------------- This allows the grouping of an array into different "groups". Great for threading long arrays by group or making them rectangular.

Total

Ranking: 43,035 of 190,127
Downloads: 27,882

Daily

Ranking: 60,204 of 190,091
Downloads: 2

Depended by

RankDownloadsName

Depends on

RankDownloadsName

Owners

#GravatarHandle
1iconmrmicrowaveoven