Class: Hash
- Inherits:
-
Object
- Object
- Hash
- Defined in:
- lib/adify.rb
Instance Method Summary collapse
Instance Method Details
#deep_merge(h) ⇒ Object
51 52 53 |
# File 'lib/adify.rb', line 51 def deep_merge(h) self.merge!(h) {|key, _old, _new| if _old.class == Hash then _old.deep_merge(_new) else _new end } end |
#update_values(&block) ⇒ Object
48 49 50 |
# File 'lib/adify.rb', line 48 def update_values(&block) self.update(self){|k,v| block.call v} end |