Module: TTN::Helpers::Core::Hash
- Defined in:
- lib/TTN/helpers/core/hash.rb
Instance Method Summary collapse
Instance Method Details
#only(*keys) ⇒ Object
10 11 12 |
# File 'lib/TTN/helpers/core/hash.rb', line 10 def only(*keys) dup.only!(*keys) end |
#only!(*the_keys) ⇒ Object
14 15 16 17 |
# File 'lib/TTN/helpers/core/hash.rb', line 14 def only!(*the_keys) keys.each { |key| delete(key) unless the_keys.include?(key) } self end |
#options_merge!(options) ⇒ Object
6 7 8 |
# File 'lib/TTN/helpers/core/hash.rb', line 6 def () self..reverse_merge! end |