Class: Hash
- Inherits:
-
Object
- Object
- Hash
- Defined in:
- lib/core_ext/hash.rb
Instance Method Summary collapse
Instance Method Details
#deep_merge_if(condition, target) ⇒ Object
6 7 8 |
# 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) ⇒ Object
2 3 4 |
# File 'lib/core_ext/hash.rb', line 2 def merge_if(condition, target = nil) condition ? self.merge(target ? target : condition) : self end |