Method: Mash#initialize

Defined in:
lib/extlib/mash.rb

#initialize(constructor = {}) ⇒ Mash

Returns a new instance of Mash.

Parameters:

  • constructor (Object) (defaults to: {})

    The default value for the mash. Defaults to an empty hash.



13
14
15
16
17
18
19
20
# File 'lib/extlib/mash.rb', line 13

def initialize(constructor = {})
  if constructor.is_a?(Hash)
    super()
    update(constructor)
  else
    super(constructor)
  end
end