Sha256: 40c7591cff9fc95bb52372bd157450dade2d2e6b8d79775ee3c62c615c0c40a2
Contents?: true
Size: 502 Bytes
Versions: 8
Compression:
Stored size: 502 Bytes
Contents
module Verdict module Storage class MemoryStorage < BaseStorage attr_reader :storage def initialize @storage = {} end protected def get(scope, key) @storage[scope] ||= {} @storage[scope][key] end def set(scope, key, value) @storage[scope] ||= {} @storage[scope][key] = value end def remove(scope, key) @storage[scope] ||= {} @storage[scope].delete(key) end end end end
Version data entries
8 entries across 8 versions & 1 rubygems