Sha256: 9f46df885ea5c08834b8ac36fb8c5bdd077af1015c3f20f67a79fc3db09149ff
Contents?: true
Size: 504 Bytes
Versions: 7
Compression:
Stored size: 504 Bytes
Contents
module Polyfill module V2_5 module Enumerable def all?(*pattern) return super if pattern.empty? grep(*pattern).size == size end def any?(*pattern) return super if pattern.empty? !grep(*pattern).empty? end def none?(*pattern) return super if pattern.empty? grep(*pattern).empty? end def one?(*pattern) return super if pattern.empty? grep(*pattern).size == 1 end end end end
Version data entries
7 entries across 7 versions & 1 rubygems