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
- #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.
33 34 35 36 37 38 |
# File 'lib/ldclient-rb/impl/evaluator.rb', line 33 def initialize(original_flag) @prereq_stack = EvaluatorStack.new(original_flag.key) @segment_stack = EvaluatorStack.new(nil) @prerequisites = [] @depth = 0 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.
44 45 46 |
# File 'lib/ldclient-rb/impl/evaluator.rb', line 44 def depth @depth 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.
46 47 48 |
# File 'lib/ldclient-rb/impl/evaluator.rb', line 46 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.
45 46 47 |
# File 'lib/ldclient-rb/impl/evaluator.rb', line 45 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.
47 48 49 |
# File 'lib/ldclient-rb/impl/evaluator.rb', line 47 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.
40 41 42 |
# File 'lib/ldclient-rb/impl/evaluator.rb', line 40 def record_evaluated_prereq_key(key) @prerequisites.push(key) if @depth.zero? end |