Class: Hash
- Inherits:
-
Object
- Object
- Hash
- Defined in:
- lib/mauth/core_ext.rb
Instance Method Summary collapse
-
#stringify_symbol_keys ⇒ Object
like stringify_keys, but does not attempt to stringify anything other than Symbols.
Instance Method Details
#stringify_symbol_keys ⇒ Object
like stringify_keys, but does not attempt to stringify anything other than Symbols. other keys are left alone.
6 7 8 |
# File 'lib/mauth/core_ext.rb', line 6 def stringify_symbol_keys inject({}) { |acc, (k, v)| acc.update((k.is_a?(Symbol) ? k.to_s : k) => v) } end |