Class: LaunchDarkly::Impl::Integrations::TestData::TestDataSource Private
- Inherits:
-
Object
- Object
- LaunchDarkly::Impl::Integrations::TestData::TestDataSource
- Includes:
- LaunchDarkly::Interfaces::DataSource
- Defined in:
- lib/ldclient-rb/impl/integrations/test_data/test_data_source.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
-
#initialize(feature_store, test_data) ⇒ TestDataSource
constructor
private
A new instance of TestDataSource.
- #initialized? ⇒ Boolean private
- #start ⇒ Object private
- #stop ⇒ Object private
- #upsert(kind, item) ⇒ Object private
Constructor Details
#initialize(feature_store, test_data) ⇒ TestDataSource
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of TestDataSource.
11 12 13 14 |
# File 'lib/ldclient-rb/impl/integrations/test_data/test_data_source.rb', line 11 def initialize(feature_store, test_data) @feature_store = feature_store @test_data = test_data end |
Instance Method Details
#initialized? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
16 17 18 |
# File 'lib/ldclient-rb/impl/integrations/test_data/test_data_source.rb', line 16 def initialized? true end |
#start ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
20 21 22 23 24 25 26 |
# File 'lib/ldclient-rb/impl/integrations/test_data/test_data_source.rb', line 20 def start ready = Concurrent::Event.new ready.set init_data = @test_data.make_init_data @feature_store.init(init_data) ready end |
#stop ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
28 29 30 |
# File 'lib/ldclient-rb/impl/integrations/test_data/test_data_source.rb', line 28 def stop @test_data.closed_instance(self) end |
#upsert(kind, item) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
32 33 34 |
# File 'lib/ldclient-rb/impl/integrations/test_data/test_data_source.rb', line 32 def upsert(kind, item) @feature_store.upsert(kind, item) end |