In Files

Parent

Files

Class Index [+]

Quicksearch

Hash

Public Instance Methods

stringify_keys() click to toggle source

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
stringify_keys!() click to toggle source

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
to_mash() click to toggle source

Returns a new Mash initialized from this Hash.

     # File lib/mash.rb, line 206
206:   def to_mash
207:     mash = Mash.new(self)
208:     mash.default = default
209:     mash
210:   end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.