Method: Mash#initialize

Defined in:
lib/racker/smash/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.



59
60
61
62
63
64
65
66
# File 'lib/racker/smash/mash.rb', line 59

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