Module: Waves::Ext::Hash
- Included in:
- Hash
- Defined in:
- lib/waves/ext/hash.rb
Overview
Utility methods mixed into Hash.
Instance Method Summary collapse
-
#stringify_keys ⇒ Object
Return a copy of the hash where all keys have been converted to strings.
-
#symbolize_keys! ⇒ Object
Destructively convert all keys to symbols.
Instance Method Details
#stringify_keys ⇒ Object
Return a copy of the hash where all keys have been converted to strings.
8 9 10 11 12 13 |
# File 'lib/waves/ext/hash.rb', line 8 def stringify_keys inject({}) do |, (key, value)| [key.to_s] = value end end |