You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Stash is just like Hash, except that all keys are converted to Strings.
require 'hashery/stash'
h = Stash.new
h[:a] = 1
h[:b] = 2
h #=> {'a'=>1, 'b'=>2}
This is true regardless of the type of key used --all will receive the #to_s message upon assignment.
h = Stash.new
h[1] = 1
h[nil] = 2
h #=> {'1'=>1, ''=>2}
Note On Separate Gem
Stash used to be a standalone library. In fact, you can still install stash as a separate gem. However you will get a aging discontinued version of the class. All new development is only available via hashery.