Sha256: 87cd7dd825c4100de81c1e71ba467e5774568dccaa5c302def450171cede202a
Contents?: true
Size: 424 Bytes
Versions: 7
Compression:
Stored size: 424 Bytes
Contents
class Hash unless instance_methods.include? :only # same as select_with_keys without forcing `Symbol` usage # def only *ks ks = ks.compact.uniq select {|k,v| ks.include? k} end end unless instance_methods.include? :not # same as select_without_keys without forcing `Symbol` usage # def not *ks ks = ks.compact.uniq select {|k,v| !ks.include? k} end end end
Version data entries
7 entries across 7 versions & 1 rubygems