Sha256: 4d0b23a5f3e2c62ac772a11c1e9f0128c7cc2cce0e7ef6efb2a2dc26e38f037f
Contents?: true
Size: 176 Bytes
Versions: 10
Compression:
Stored size: 176 Bytes
Contents
class Array def every(num=1) index = 0 while self[index] yield(*(1..num).to_a.inject([]) { |acc, n| acc<<self[index+n-1] }) index+=num end end end
Version data entries
10 entries across 10 versions & 1 rubygems