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,340 of 192,263
Downloads: 28,153

Daily

Ranking: 31,262 of 192,239
Downloads: 7

Depended by

RankDownloadsName

Depends on

RankDownloadsName

Owners

#GravatarHandle
1iconmrmicrowaveoven