Class: Hashie::Mash
- Inherits:
-
Object
- Object
- Hashie::Mash
- Defined in:
- lib/rakumarket.rb
Instance Method Summary collapse
-
#rubyify_keys! ⇒ Object
Converts all of the keys to strings, optionally formatting key name.
Instance Method Details
#rubyify_keys! ⇒ Object
Converts all of the keys to strings, optionally formatting key name
41 42 43 44 45 46 47 48 49 |
# File 'lib/rakumarket.rb', line 41 def rubyify_keys! keys.each{|k| v = delete(k) regular_writer(k.to_s.underscore, v) v.rubyify_keys! if v.is_a?(Hash) v.each{|p| p.rubyify_keys! if p.is_a?(Hash)} if v.is_a?(Array) } self end |