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: 42,590 of 188,678
Downloads: 27,786

Daily

Ranking: 109,889 of 188,661
Downloads: 1

Depended by

RankDownloadsName

Depends on

RankDownloadsName

Owners

#GravatarHandle
1iconmrmicrowaveoven