Class: LaunchDarkly::Impl::EvaluatorState Private
- Inherits:
-
Object
- Object
- LaunchDarkly::Impl::EvaluatorState
- Defined in:
- lib/ldclient-rb/impl/evaluator.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 Attribute Summary collapse
- #depth ⇒ Object private
-
#override_affected ⇒ Object
private
True if the evaluation in progress has read a definition that carries the override marker.
- #prereq_stack ⇒ Object readonly private
- #prerequisites ⇒ Object readonly private
- #segment_stack ⇒ Object readonly private
Instance Method Summary collapse
-
#initialize(original_flag) ⇒ EvaluatorState
constructor
private
A new instance of EvaluatorState.
- #record_evaluated_prereq_key(key) ⇒ Object private
Constructor Details
#initialize(original_flag) ⇒ EvaluatorState
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 EvaluatorState.
34 35 36 37 38 39 40 41 42 |
# File 'lib/ldclient-rb/impl/evaluator.rb', line 34 def initialize(original_flag) @prereq_stack = EvaluatorStack.new(original_flag.key) @segment_stack = EvaluatorStack.new(nil) @prerequisites = [] @depth = 0 # Reading the flag's own definition is the first read of the evaluation, so the marking # starts from the flag's override marker. @override_affected = original_flag.override? end |
Instance Attribute Details
#depth ⇒ 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.
48 49 50 |
# File 'lib/ldclient-rb/impl/evaluator.rb', line 48 def depth @depth end |
#override_affected ⇒ 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.
True if the evaluation in progress has read a definition that carries the override marker. While a prerequisite is evaluated, this holds the marking of the prerequisite's own subtree. The marking propagates upward only.
55 56 57 |
# File 'lib/ldclient-rb/impl/evaluator.rb', line 55 def override_affected @override_affected end |
#prereq_stack ⇒ Object (readonly)
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.
50 51 52 |
# File 'lib/ldclient-rb/impl/evaluator.rb', line 50 def prereq_stack @prereq_stack end |
#prerequisites ⇒ Object (readonly)
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.
49 50 51 |
# File 'lib/ldclient-rb/impl/evaluator.rb', line 49 def prerequisites @prerequisites end |
#segment_stack ⇒ Object (readonly)
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.
51 52 53 |
# File 'lib/ldclient-rb/impl/evaluator.rb', line 51 def segment_stack @segment_stack end |
Instance Method Details
#record_evaluated_prereq_key(key) ⇒ 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.
44 45 46 |
# File 'lib/ldclient-rb/impl/evaluator.rb', line 44 def record_evaluated_prereq_key(key) @prerequisites.push(key) if @depth.zero? end |