Sha256: 8a1a9dbe76c5e17d88f155e19383c5001d5fffa008c7f8860bfa6a380dfa7434
Contents?: true
Size: 223 Bytes
Versions: 18
Compression:
Stored size: 223 Bytes
Contents
class Array # like detect, but returns the calculated value def grab(&blk) result = each do |element| value = yield element break value if value end return if result == self result end end
Version data entries
18 entries across 18 versions & 1 rubygems