instance method
replace
Ruby on Rails 4.1.16
Since v4.0.13 Last seen in v4.2.9Signature
replace(other_hash)
Replaces the contents of this hash with other_hash.
h = { "a" => 100, "b" => 200 } h.replace({ "c" => 300, "d" => 400 }) # => {"c"=>300, "d"=>400}
Parameters
-
other_hashreq
Source
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 212
def replace(other_hash)
super(self.class.new_from_hash_copying_default(other_hash))
end
Defined in activesupport/lib/active_support/hash_with_indifferent_access.rb line 212
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in HashWithIndifferentAccess