instance method
except!
Ruby on Rails 4.2.9
Since v3.0.20Signature
except!(*keys)
Replaces the hash without the given keys.
hash = { a: true, b: false, c: nil} hash.except!(:c) # => { a: true, b: false} hash # => { a: true, b: false }
Parameters
-
keysrest
Source
# File activesupport/lib/active_support/core_ext/hash/except.rb, line 17
def except!(*keys)
keys.each { |key| delete(key) }
self
end
Defined in activesupport/lib/active_support/core_ext/hash/except.rb line 17
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Hash