Module: Artifactory::Permissions::Helpers
- Defined in:
- lib/artifactory/permissions/helpers.rb
Class Method Summary collapse
Class Method Details
.deep_hash ⇒ Object
16 17 18 |
# File 'lib/artifactory/permissions/helpers.rb', line 16 def deep_hash Hash.new { |h, k| h[k] = Hash.new &h.default_proc } end |
.deep_merge!(hash, other) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/artifactory/permissions/helpers.rb', line 6 def deep_merge!(hash, other) hash.merge!(other) do |key, val, other_val| if val.is_a?(Hash) && other_val.is_a?(Hash) deep_merge!(val, other_val) else other_val end end end |