Class: Stash

Class | Stash
In: | lib/more/facets/stash.rb
Parent: | Hash

# 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.

### Methods

<< [] []= fetch has_key? key? store

### Public Instance methods

<<(other)

[Source]

    # File lib/more/facets/stash.rb, line 38
      def <<(other)
        cash other
        when Hash
          super(other.rekey(&:to_s))
        when Array
          self[other[0].to_s] = other[1]
        else
          raise ArgumentError
        end

[](k)

[Source]

    # File lib/more/facets/stash.rb, line 30
      def [](k)
        super(k.to_s)
      end

[]=(k,v)

[Source]

    # File lib/more/facets/stash.rb, line 34
      def []=(k,v)
        super(k.to_s, v)
      end

fetch(k)

[Source]

    # File lib/more/facets/stash.rb, line 14
      def fetch(k)
        super(k.to_s)
      end

has_key?(k)

[Source]

    # File lib/more/facets/stash.rb, line 22
      def has_key?(k)
        super(k.to_s)
      end

key?(k)

[Source]

    # File lib/more/facets/stash.rb, line 26
      def key?(k)
        super(k.to_s)
      end

store(k, v)

[Source]

    # File lib/more/facets/stash.rb, line 18
      def store(k, v)
        super(k.to_s, v)
      end

[Validate]