Method: Settingable::Hash#initialize

Defined in:
lib/settingable/hash.rb

#initialize(body = {}) ⇒ Hash

Initialize the hash. If a value is passed, the values are set on this hash. Does not modify the value.

Parameters:

  • body (Hash) (defaults to: {})

See Also:

  • #convert


11
12
13
14
15
# File 'lib/settingable/hash.rb', line 11

def initialize(body = {})
  body.each do |key, value|
    self[key] = value
  end
end