A HashieHash is
simply a Hash that has convenience functions baked
in such as stringify_keys that may not be available in all libraries.
Public Instance Methods
to_hash()click to toggle source
Converts a mash back to a hash (with stringified keys)
# File lib/hashie/hash.rb, line 9
9: defto_hash
10: out = {}
11: keys.eachdo|k|
12: out[k] = Hashie::Hash===self[k] ?self[k].to_hash:self[k]
13: end
14: out
15: end
to_json(*args)click to toggle source
The C geneartor for the json gem doesn’t like mashies
# File lib/hashie/hash.rb, line 18
18: defto_json(*args)
19: to_hash.to_json(*args)
20: end