Sha256: 0548cb5a723582dba2eab0107c1de747c95ef76ef3265bfdd91b01b1a2bfd768
Contents?: true
Size: 231 Bytes
Versions: 24
Compression:
Stored size: 231 Bytes
Contents
#-- # Glory to the _why! #++ class Array # Partition an array into parts of given length. def / len inject([]) do |ary, x| ary << [] if [*ary.last].nitems % len == 0 ary.last << x ary end end end
Version data entries
24 entries across 24 versions & 1 rubygems