Class: Hash
- Inherits:
-
Object
- Object
- Hash
- Defined in:
- lib/laze/core_extensions.rb
Overview
:nodoc:
Instance Method Summary collapse
Instance Method Details
#stringify_keys ⇒ Object
2 3 4 5 6 7 |
# File 'lib/laze/core_extensions.rb', line 2 def stringify_keys inject({}) do |output, (key, value)| output[(key.to_s rescue key) || key] = value output end end |
#symbolize_keys ⇒ Object
9 10 11 12 13 14 |
# File 'lib/laze/core_extensions.rb', line 9 def symbolize_keys inject({}) do |output, (key, value)| output[(key.to_sym rescue key) || key] = value output end end |