instance method
merge
Ruby on Rails 4.2.9
Since v3.0.20Signature
merge(hash, &block)
This method has the same semantics of update, except it does not modify the receiver but rather returns a new hash with indifferent access with the result of the merge.
Parameters
-
hashreq -
blockblock
Source
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 198
def merge(hash, &block)
self.dup.update(hash, &block)
end
Defined in activesupport/lib/active_support/hash_with_indifferent_access.rb line 198
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::HashWithIndifferentAccess