Class: VER::Keymap::MapHash
- Inherits:
-
Hash
- Object
- Hash
- VER::Keymap::MapHash
- Defined in:
- lib/ver/keymap.rb
Overview
A subclass to make lookup unambigous
Instance Method Summary collapse
Instance Method Details
#deep_each(&block) ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/ver/keymap.rb', line 38 def deep_each(&block) if block each do |key, value| if value.respond_to?(:deep_each) value.deep_each(&block) else yield key, value end end else Enumerator.new(self, :deep_each) end end |
#deep_merge(other) ⇒ Object
56 57 58 |
# File 'lib/ver/keymap.rb', line 56 def deep_merge(other) merge(other, &MERGER) end |
#deep_merge!(other) ⇒ Object
52 53 54 |
# File 'lib/ver/keymap.rb', line 52 def deep_merge!(other) replace(merge(other, &MERGER)) end |