class Hash
def except!(*keys)
hash.except!(:c) # => { a: true, b: false }
hash = { a: true, b: false, c: nil }
Removes the given keys from hash and returns it.
def except!(*keys) keys.each { |key| delete(key) } self end
def except!(*keys) keys.each { |key| delete(key) } self end