Method: Mash#update

Defined in:
lib/extlib/mash.rb

#update(other_hash) ⇒ Mash Also known as: merge!

Returns The updated mash.

Parameters:

  • other_hash (Hash)

    A hash to update values in the mash with. The keys and the values will be converted to Mash format.

Returns:

  • (Mash)

    The updated mash.



53
54
55
56
# File 'lib/extlib/mash.rb', line 53

def update(other_hash)
  other_hash.each_pair { |key, value| regular_writer(convert_key(key), convert_value(value)) }
  self
end