Class: LaunchDarkly::Impl::FlagTracker
- Inherits:
-
Object
- Object
- LaunchDarkly::Impl::FlagTracker
- Extended by:
- Forwardable
- Includes:
- LaunchDarkly::Interfaces::FlagTracker
- Defined in:
- lib/ldclient-rb/impl/flag_tracker.rb
Overview
Defined Under Namespace
Classes: FlagValueChangeAdapter
Instance Method Summary collapse
- #add_flag_value_change_listener(key, context, listener) ⇒ Object
-
#initialize(broadcaster, eval_fn) ⇒ FlagTracker
constructor
A new instance of FlagTracker.
Methods included from LaunchDarkly::Interfaces::FlagTracker
#add_listener, #remove_listener
Constructor Details
#initialize(broadcaster, eval_fn) ⇒ FlagTracker
Returns a new instance of FlagTracker.
13 14 15 16 |
# File 'lib/ldclient-rb/impl/flag_tracker.rb', line 13 def initialize(broadcaster, eval_fn) @broadcaster = broadcaster @eval_fn = eval_fn end |
Instance Method Details
#add_flag_value_change_listener(key, context, listener) ⇒ Object
18 19 20 21 22 23 |
# File 'lib/ldclient-rb/impl/flag_tracker.rb', line 18 def add_flag_value_change_listener(key, context, listener) flag_change_listener = FlagValueChangeAdapter.new(key, context, listener, @eval_fn) add_listener(flag_change_listener) flag_change_listener end |