Class: Hash
- Inherits:
-
Object
- Object
- Hash
- Defined in:
- lib/backnob/hash.rb
Overview
:nodoc: all
Direct Known Subclasses
Instance Method Summary collapse
-
#symbolize_keys! ⇒ Object
Destructively convert all keys to symbols.
Instance Method Details
#symbolize_keys! ⇒ Object
Destructively convert all keys to symbols.
3 4 5 6 7 8 9 10 11 |
# File 'lib/backnob/hash.rb', line 3 def symbolize_keys! keys.each do |key| unless key.is_a?(Symbol) self[key.to_sym] = self[key] delete(key) end end self end |