Sha256: 785e5b37ae8d2cdd53e3db66ac36dc6c9c0a637599003b016618a72abe3a3608

Contents?: true

Size: 418 Bytes

Versions: 14

Compression:

Stored size: 418 Bytes

Contents

require 'yaml'

# A simple in-memory store backed by a Hash.
class Robut::Storage::HashStore < Robut::Storage::Base
    
  class << self

    # Stores +v+ in the hash.
    def []=(k, v)
      internal[k] = v
    end

    # Returns the value at key +k+.
    def [](k)
      internal[k]
    end

    private
    # The hash the data is being stored in.
    def internal
      @internal ||= {}
    end
    
  end
    
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
sclemmer-robut-0.6.3 lib/robut/storage/hash_store.rb
sclemmer-robut-0.6.2 lib/robut/storage/hash_store.rb
sclemmer-robut-0.6.1 lib/robut/storage/hash_store.rb
sclemmer-robut-0.6.0 lib/robut/storage/hash_store.rb
sclemmer-robut-0.5.4 lib/robut/storage/hash_store.rb
sclemmer-robut-0.5.3 lib/robut/storage/hash_store.rb
sclemmer-robut-0.5.2 lib/robut/storage/hash_store.rb
robut-0.5.2 lib/robut/storage/hash_store.rb
robut-0.5.1 lib/robut/storage/hash_store.rb
robut-0.5.0 lib/robut/storage/hash_store.rb
robut-0.4.0 lib/robut/storage/hash_store.rb
robut-0.3.0 lib/robut/storage/hash_store.rb
robut-0.2.1 lib/robut/storage/hash_store.rb
robut-0.2.0 lib/robut/storage/hash_store.rb