Sha256: 03bcd3991ea2f2190eeec8647a3b922f4d4f35443b88cfb4c643150afae7c2e3
Contents?: true
Size: 272 Bytes
Versions: 18
Compression:
Stored size: 272 Bytes
Contents
class Array if !respond_to?(:pluck) # Accepts a block and returns the first element for which the block # returns true. def pluck(&blk) i = 0 while i < length return self[i] if blk.call(self[i]) i += 1 end end end end
Version data entries
18 entries across 18 versions & 1 rubygems