Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/asetus.rb

Instance Method Summary collapse

Instance Method Details

#_asetus_deep_merge(newhash) ⇒ Object


159
160
161
162
163
164
# File 'lib/asetus.rb', line 159

def _asetus_deep_merge newhash
  merger = proc do |key, oldval, newval|
    Hash === oldval && Hash === newval ? oldval.merge(newval, &merger) : newval
  end
  merge newhash, &merger
end