Class: LaunchDarkly::Impl::Model::EvalResultsForSingleVariation Private
- Inherits:
-
Object
- Object
- LaunchDarkly::Impl::Model::EvalResultsForSingleVariation
- Defined in:
- lib/ldclient-rb/impl/model/preprocessed_data.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.
Container for a precomputed result that includes a specific variation index and value, an evaluation reason, and optionally an alternate evaluation reason that corresponds to the “in experiment” state.
Instance Method Summary collapse
- #get_result(in_experiment = false) ⇒ LaunchDarkly::EvaluationDetail private
-
#initialize(value, variation_index, regular_reason, in_experiment_reason = nil) ⇒ EvalResultsForSingleVariation
constructor
private
A new instance of EvalResultsForSingleVariation.
Constructor Details
#initialize(value, variation_index, regular_reason, in_experiment_reason = nil) ⇒ EvalResultsForSingleVariation
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 EvalResultsForSingleVariation.
12 13 14 15 16 17 |
# File 'lib/ldclient-rb/impl/model/preprocessed_data.rb', line 12 def initialize(value, variation_index, regular_reason, in_experiment_reason = nil) @regular_result = EvaluationDetail.new(value, variation_index, regular_reason) @in_experiment_result = in_experiment_reason ? EvaluationDetail.new(value, variation_index, in_experiment_reason) : @regular_result end |
Instance Method Details
#get_result(in_experiment = false) ⇒ LaunchDarkly::EvaluationDetail
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.
22 23 24 |
# File 'lib/ldclient-rb/impl/model/preprocessed_data.rb', line 22 def get_result(in_experiment = false) in_experiment ? @in_experiment_result : @regular_result end |