Object
Returns a duplicate of the current hash with all of the keys converted to strings.
# File lib/mash.rb, line 214
214: def stringify_keys
215: dup.stringify_keys!
216: end
Converts all of the keys to strings
# File lib/mash.rb, line 219
219: def stringify_keys!
220: keys.each{|k|
221: v = delete(k)
222: self[k.to_s] = v
223: v.stringify_keys! if v.is_a?(Hash)
224: v.each{|p| p.stringify_keys! if p.is_a?(Hash)} if v.is_a?(Array)
225: }
226: self
227: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.