method

update

Importance_1
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: HashWithIndifferentAccess
update(other_hash) public

Updates the instantized hash with values from the second:

  hash_1 = HashWithIndifferentAccess.new
  hash_1[:key] = "value"

  hash_2 = HashWithIndifferentAccess.new
  hash_2[:key] = "New Value!"

  hash_1.update(hash_2) # => {"key"=>"New Value!"}
Show source
Register or log in to add new notes.