Sha256: d5ad6abb7644d88f7efb21f55a903696d087311eab331f421bc83682091c1204

Contents?: true

Size: 502 Bytes

Versions: 2

Compression:

Stored size: 502 Bytes

Contents

# frozen_string_literal: true

# A very simple cache story for the test suite that mimics the ActiveSupport::Cache::Store interface
module FidoMetadata
  class TestCacheStore
    def initialize
      @store = {}
    end

    def read(name, _options = nil)
      @store[name]
    end

    def write(name, value, _options = nil)
      @store[name] = value
    end

    def delete(name, _options = nil)
      @store.delete(name)
    end

    def clear(_options = nil)
      @store.clear
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fido_metadata-0.4.0 lib/fido_metadata/test_cache_store.rb
fido_metadata-0.3.0 lib/fido_metadata/test_cache_store.rb