instance method
[]=
Ruby on Rails 2.2.3
Since v2.2.3 Last seen in v4.2.9Signature
[]=(key, value)
Assigns a new value to the hash:
hash = HashWithIndifferentAccess.new hash[:key] = "value"
Parameters
-
keyreq -
valuereq
Source
# File activesupport/lib/active_support/core_ext/hash/indifferent_access.rb, line 31
def []=(key, value)
regular_writer(convert_key(key), convert_value(value))
end
Defined in activesupport/lib/active_support/core_ext/hash/indifferent_access.rb line 31
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in HashWithIndifferentAccess