Class | Hash |
In: |
lib/hashery/stash.rb
lib/hashery/openobject.rb |
Parent: | Object |
Core Extensions
Synonym for Hash#rekey, but modifies the receiver in place (and returns it).
foo = { :name=>'Gavin', :wife=>:Lisa } foo.rekey!{ |k| k.to_s } #=> { "name"=>"Gavin", "wife"=>:Lisa } foo.inspect #=> { "name"=>"Gavin", "wife"=>:Lisa }
This method comes from Ruby Facets.