class Hash
Public Instance Methods
deep_merge_if(condition, target)
click to toggle source
# File lib/core_ext/hash.rb, line 6 def deep_merge_if(condition, target) condition ? self.deep_merge(target) : self end
merge_if(condition, target = nil)
click to toggle source
# File lib/core_ext/hash.rb, line 2 def merge_if(condition, target = nil) condition ? self.merge(target ? target : condition) : self end