Sha256: 69dbadf4e752e973ee8949aa895702bff7361aab42699fd76ac6517f8752e29b
Contents?: true
Size: 445 Bytes
Versions: 18
Compression:
Stored size: 445 Bytes
Contents
module Mangadex module Storage class Memory < BasicObject def initialize @storage = {} end def get(scope, key) @storage.dig(scope.to_s, key.to_s) end def set(scope, key, value) key = key.to_s @storage[scope] = {} unless @storage.has_key?(scope) @storage[scope][key] = value end def clear(scope) @storage.delete(scope) end end end end
Version data entries
18 entries across 18 versions & 1 rubygems