Class Stash
In: lib/hashery/stash.rb
Parent: Hash

Stash is just like Hash, except that all keys are converted to Strings.

Note this doesn‘t yet handle default_proc.

Methods

<<   []   []   []=   delete   fetch   has_key?   include?   key?   member?   merge   merge!   rekey   rekey!   replace   store   to_h   to_hash   update   values_at  

Public Class methods

Public Instance methods

Synonym for Hash#rekey, but modifies the receiver in place (and returns it).

  foo = { :name=>'Gavin', :wife=>:Lisa }.to_stash
  foo.rekey!{ |k| k.upcase }  #=>  { "NAME"=>"Gavin", "WIFE"=>:Lisa }
  foo.inspect                 #=>  { "NAME"=>"Gavin", "WIFE"=>:Lisa }
to_h()

Alias for to_hash

[Validate]