Class: Hash
- Inherits:
-
Object
- Object
- Hash
- Defined in:
- lib/amazon/mws/lib/extensions.rb
Class Method Summary collapse
-
.keys_to_s(value) ⇒ Object
take keys of hash and transform those to a symbols.
Class Method Details
.keys_to_s(value) ⇒ Object
take keys of hash and transform those to a symbols
69 70 71 72 73 |
# File 'lib/amazon/mws/lib/extensions.rb', line 69 def self.keys_to_s(value) return value if not value.is_a?(Hash) hash = value.inject({}){|memo,(k,v)| memo[k.to_s] = Hash.keys_to_s(v); memo} return hash end |