class Hash
in lib/core_extensions.rb
Public Instance Methods
remove(*keys)
click to toggle source
non-destructive version
# File lib/core_extensions.rb, line 17 def remove(*keys) self.dup.remove!(*keys) end
remove!(*keys)
click to toggle source
pass single or array of keys, which will be removed, returning the remaining hash
# File lib/core_extensions.rb, line 11 def remove!(*keys) keys.each{|key| self.delete(key) } self end