Class: Hash

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

Instance Method Summary collapse

Instance Method Details

#deep_merge(other) ⇒ Object



23
24
25
26
27
28
29
30
31
# File 'lib/puppet_library/server.rb', line 23

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