Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/mauth/core_ext.rb

Instance Method Summary collapse

Instance Method Details

#stringify_symbol_keysObject

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