Class | Stash |
In: |
lib/more/facets/stash.rb
|
Parent: | Hash |
Stash is just like Hash, except that all keys are converted to Strings.
This is rather fresh code, so is not yet complete. For instnace, it currently does not ensure that default keys are strings when using default_proc.
# File lib/more/facets/stash.rb, line 38 38: def <<(other) 39: cash other 40: when Hash 41: super(other.rekey(&:to_s)) 42: when Array 43: self[other[0].to_s] = other[1] 44: else 45: raise ArgumentError 46: end