Sha256: 2979e3dce4daffb881bc5ba6bf42041b5e736272d51d41b0299ca9b3ef54d7b6
Contents?: true
Size: 679 Bytes
Versions: 16
Compression:
Stored size: 679 Bytes
Contents
module SplitIoClient module Cache module Repositories # Repository which forwards impressions interface to the selected adapter class ImpressionsRepository < Repository extend Forwardable def_delegators :@adapter, :add, :add_bulk, :get_batch, :empty? def initialize(adapter) @adapter = case adapter.class.to_s when 'SplitIoClient::Cache::Adapters::MemoryAdapter' Repositories::Impressions::MemoryRepository.new(adapter) when 'SplitIoClient::Cache::Adapters::RedisAdapter' Repositories::Impressions::RedisRepository.new(adapter) end end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems