Class: LaunchDarkly::Impl::EvaluatorState Private

Inherits:
Object
  • Object
show all
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.

Since:

  • 5.5.0

Instance Attribute Summary collapse

Instance Method Summary collapse

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.

Parameters:

Since:

  • 5.5.0



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

#depthObject

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.

Since:

  • 5.5.0



44
45
46
# File 'lib/ldclient-rb/impl/evaluator.rb', line 44

def depth
  @depth
end

#prereq_stackObject (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.

Since:

  • 5.5.0



46
47
48
# File 'lib/ldclient-rb/impl/evaluator.rb', line 46

def prereq_stack
  @prereq_stack
end

#prerequisitesObject (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.

Since:

  • 5.5.0



45
46
47
# File 'lib/ldclient-rb/impl/evaluator.rb', line 45

def prerequisites
  @prerequisites
end

#segment_stackObject (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.

Since:

  • 5.5.0



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.

Since:

  • 5.5.0



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