module HashHelper
Public Instance Methods
except(*keys)
click to toggle source
Return a hash that includes everything but the given keys.
@return [Hash]
# File lib/rubyhelper/hash.rb, line 6 def except(*keys) return self.dup.except!(*keys) end
except!(*keys)
click to toggle source
Replaces the hash without the given keys.
@return [Hash]
# File lib/rubyhelper/hash.rb, line 13 def except!(*keys) keys.each { |key| self.delete(key) } return self end