Module: CoreExtensions::HashExt

Defined in:
lib/content/pipeline/core_extensions/hash_ext.rb

Instance Method Summary collapse

Instance Method Details

#deep_merge(new_hash) ⇒ Object



4
5
6
7
8
# File 'lib/content/pipeline/core_extensions/hash_ext.rb', line 4

def deep_merge(new_hash)
  merge(new_hash) do |k, o, n|
    o.is_a?(Hash) && n.is_a?(Hash) ? o.deep_merge(n) : n
  end
end