Module: Mongoo::HashExt
- Included in:
- Hash
- Defined in:
- lib/mongoo/hash_ext.rb
Instance Method Summary collapse
Instance Method Details
#deep_stringify_keys! ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/mongoo/hash_ext.rb', line 4 def deep_stringify_keys! keys.each do |key| self[key.to_s] = delete(key) if self[key.to_s].is_a?(Hash) self[key.to_s].deep_stringify_keys! end end self end |