Sha256: f680a03144bc81883ce4cecac4214370071665a4a9660ae52c73b1a07ff44468
Contents?: true
Size: 396 Bytes
Versions: 19
Compression:
Stored size: 396 Bytes
Contents
#!/usr/local/bin/ruby -w # # == extensions/hash.rb # # Adds methods to the builtin Hash class. # require "extensions/_base" # # * Hash#select! # ExtensionsProject.implement(Hash, :select!) do class Hash # # In-place version of Hash#select. (Counterpart to, and opposite of, the # built-in #reject!) # def select! reject! { |k,v| not yield(k,v) } end end end
Version data entries
19 entries across 19 versions & 4 rubygems