Sha256: 2393012764a4790f21d087fa4af487ac7f34a60f89a44c25a741fe8ad364c37c
Contents?: true
Size: 341 Bytes
Versions: 7
Compression:
Stored size: 341 Bytes
Contents
module CardsLib::Refinements module InjectWhile refine Array do def inject_while?(m) result, *array = self.dup loop do break if array.empty? other = array.shift result = result.send(m, other) return false unless result end true end end end end
Version data entries
7 entries across 7 versions & 1 rubygems