Class: Hash
- Inherits:
-
Object
- Object
- Hash
- Defined in:
- lib/check_mobi/core_ext/hash.rb
Instance Method Summary collapse
Instance Method Details
#cm_stringify_keys ⇒ Object
6 7 8 9 |
# File 'lib/check_mobi/core_ext/hash.rb', line 6 def cm_stringify_keys super if defined? Rails self.inject({}){|memo,(k,v)| memo[k.to_s] = v; memo} end |
#cm_symbolize_keys ⇒ Object
2 3 4 |
# File 'lib/check_mobi/core_ext/hash.rb', line 2 def cm_symbolize_keys self.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo} end |