Class: Hash
- Inherits:
-
Object
- Object
- Hash
- Defined in:
- lib/freelancer/extensions/hash.rb
Instance Method Summary collapse
-
#symbolize_keys ⇒ Object
Symbolize the keys in the hash.
Instance Method Details
#symbolize_keys ⇒ Object
Symbolize the keys in the hash. Copied from ActiveSupport’s Core Extensions.
4 5 6 7 8 9 |
# File 'lib/freelancer/extensions/hash.rb', line 4 def symbolize_keys inject({}) do |, (key, value)| [(key.to_sym rescue key) || key] = value end end |