Sha256: e5914c629b9711aa6307b1c2f7fdb46e4ec0011a9953cd9adb4da1ea250da05f

Contents?: true

Size: 362 Bytes

Versions: 3

Compression:

Stored size: 362 Bytes

Contents

module Socrates
  module Storage
    class Memory
      def initialize
        @memory = {}
      end

      def has_key?(key)
        @memory.has_key?(key)
      end

      def clear(key)
        @memory.delete(key)
      end

      def get(key)
        @memory[key]
      end

      def put(key, value)
        @memory[key] = value
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
socrates-0.1.10 lib/socrates/storage/memory.rb
socrates-0.1.9 lib/socrates/storage/memory.rb
socrates-0.1.8 lib/socrates/storage/memory.rb