Class: LaunchDarkly::Impl::Model::Target Private
- Inherits:
-
Object
- Object
- LaunchDarkly::Impl::Model::Target
- Defined in:
- lib/ldclient-rb/impl/model/feature_flag.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
- #data ⇒ Hash readonly private
- #kind ⇒ String readonly private
- #match_result ⇒ LaunchDarkly::EvaluationDetail readonly private
- #values ⇒ Set readonly private
- #variation ⇒ Integer readonly private
Instance Method Summary collapse
-
#initialize(data, flag, errors_out = nil) ⇒ Target
constructor
private
A new instance of Target.
Constructor Details
#initialize(data, flag, errors_out = nil) ⇒ Target
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 Target.
174 175 176 177 178 179 180 181 182 |
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 174 def initialize(data, flag, errors_out = nil) @kind = data[:contextKind] || LDContext::KIND_DEFAULT @data = data @values = Set.new(data[:values] || []) @variation = data[:variation] @match_result = EvaluatorHelpers.evaluation_detail_for_variation(flag, data[:variation], EvaluationReason::target_match) check_variation_range(flag, errors_out, @variation, "target") end |
Instance Attribute Details
#data ⇒ Hash (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.
187 188 189 |
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 187 def data @data end |
#kind ⇒ String (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.
185 186 187 |
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 185 def kind @kind end |
#match_result ⇒ LaunchDarkly::EvaluationDetail (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.
193 194 195 |
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 193 def match_result @match_result end |
#values ⇒ Set (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.
189 190 191 |
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 189 def values @values end |
#variation ⇒ Integer (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.
191 192 193 |
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 191 def variation @variation end |