Class: SplitIoClient::Cache::Repositories::MetricsRepository
- Inherits:
-
SplitIoClient::Cache::Repository
- Object
- SplitIoClient::Cache::Repository
- SplitIoClient::Cache::Repositories::MetricsRepository
- Extended by:
- Forwardable
- Defined in:
- lib/splitclient-rb/cache/repositories/metrics_repository.rb
Overview
Repository which forwards impressions interface to the selected adapter
Instance Method Summary collapse
-
#initialize(config) ⇒ MetricsRepository
constructor
A new instance of MetricsRepository.
Methods inherited from SplitIoClient::Cache::Repository
Constructor Details
#initialize(config) ⇒ MetricsRepository
Returns a new instance of MetricsRepository.
10 11 12 13 14 15 16 17 18 |
# File 'lib/splitclient-rb/cache/repositories/metrics_repository.rb', line 10 def initialize(config) super(config) @repository = case @config.metrics_adapter.class.to_s when 'SplitIoClient::Cache::Adapters::MemoryAdapter' Repositories::Metrics::MemoryRepository.new(@config) when 'SplitIoClient::Cache::Adapters::RedisAdapter' Repositories::Metrics::RedisRepository.new(@config) end end |