instance method
[]=
Ruby on Rails 3.0.20
Since v3.0.20Signature
[]=(key, value)
Assigns a new value to the hash:
hash = HashWithIndifferentAccess.new hash[:key] = "value"
Parameters
-
keyreq -
valuereq
Source
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 44
def []=(key, value)
regular_writer(convert_key(key), convert_value(value))
end
Defined in activesupport/lib/active_support/hash_with_indifferent_access.rb line 44
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::HashWithIndifferentAccess