[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.

Required Ruby Version

>= 0

Authors

Benjamin Zagorski

Versions

  1. 0.0.10
    1. source

      1. 0.0.10 source May 03, 2019 (4.5 KB)
  2. 0.0.9
    1. source

      1. 0.0.9 source April 13, 2019 (4.5 KB)
  3. 0.0.8
    1. source

      1. 0.0.8 source April 12, 2019 (4.5 KB)
  4. 0.0.7
    1. source

      1. 0.0.7 source April 12, 2019 (4.5 KB)
  5. 0.0.6
    1. source

      1. 0.0.6 source April 12, 2019 (4.5 KB)
Show all versions (10 total)

SHA 256 checksum