Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/puppet_library/util/patches.rb

Instance Method Summary collapse

Instance Method Details

#deep_merge(other) ⇒ Object



81
82
83
84
85
86
87
88
89
# File 'lib/puppet_library/util/patches.rb', line 81

def deep_merge(other)
    merge(other) do |key, old_val, new_val|
        if old_val.instance_of? Array
            old_val + new_val
        else
            new_val
        end
    end
end