Class: Hash
- Inherits:
-
Object
- Object
- Hash
- Defined in:
- lib/puppet_forge_server/patches.rb
Instance Method Summary collapse
Instance Method Details
#deep_merge(other) ⇒ Object
33 34 35 36 37 38 39 40 41 |
# File 'lib/puppet_forge_server/patches.rb', line 33 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 |
#deep_merge!(other) ⇒ Object
43 44 45 |
# File 'lib/puppet_forge_server/patches.rb', line 43 def deep_merge!(other) replace(deep_merge(other)) end |