Class: Hash
- Inherits:
-
Object
- Object
- Hash
- Defined in:
- lib/captain_hoog/core_ext/hash.rb
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#stringify_keys ⇒ Object
2 3 4 5 6 7 8 9 10 11 |
# File 'lib/captain_hoog/core_ext/hash.rb', line 2 def stringify_keys reduce({}) do |hash, (key, value)| new_value = if value.respond_to?(:stringify_keys) value.stringify_keys else value end hash.merge(key.to_s => new_value) end end |