Class: SplitIoClient::SplitFactory
- Inherits:
-
Object
- Object
- SplitIoClient::SplitFactory
- Includes:
- Cache::Repositories, Cache::Stores
- Defined in:
- lib/splitclient-rb/split_factory.rb
Instance Attribute Summary collapse
-
#adapter ⇒ Object
readonly
Returns the value of attribute adapter.
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#manager ⇒ Object
readonly
Returns the value of attribute manager.
Instance Method Summary collapse
-
#initialize(api_key, config_hash = {}) ⇒ SplitFactory
constructor
A new instance of SplitFactory.
Constructor Details
#initialize(api_key, config_hash = {}) ⇒ SplitFactory
Returns a new instance of SplitFactory.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/splitclient-rb/split_factory.rb', line 8 def initialize(api_key, config_hash = {}) @api_key = api_key @config = SplitConfig.new(config_hash) @cache_adapter = @config.cache_adapter @splits_repository = SplitsRepository.new(@cache_adapter, @config) @segments_repository = SegmentsRepository.new(@cache_adapter, @config) @impressions_repository = ImpressionsRepository.new(@config.impressions_adapter, @config) @metrics_repository = MetricsRepository.new(@config.metrics_adapter, @config) @sdk_blocker = SDKBlocker.new(@config, @splits_repository, @segments_repository) @adapter = SplitAdapter.new(@api_key, @config, @splits_repository, @segments_repository, @impressions_repository, @metrics_repository, @sdk_blocker) @client = SplitClient.new(@api_key, @config, @adapter, @splits_repository, @segments_repository, @impressions_repository, @metrics_repository) @manager = SplitManager.new(@api_key, @config, @adapter, @splits_repository) @sdk_blocker.block if @config.block_until_ready > 0 end |
Instance Attribute Details
#adapter ⇒ Object (readonly)
Returns the value of attribute adapter.
6 7 8 |
# File 'lib/splitclient-rb/split_factory.rb', line 6 def adapter @adapter end |
#client ⇒ Object (readonly)
Returns the value of attribute client.
6 7 8 |
# File 'lib/splitclient-rb/split_factory.rb', line 6 def client @client end |
#manager ⇒ Object (readonly)
Returns the value of attribute manager.
6 7 8 |
# File 'lib/splitclient-rb/split_factory.rb', line 6 def manager @manager end |