Class: LaunchDarkly::Impl::Model::Target
- Inherits:
-
Object
- Object
- LaunchDarkly::Impl::Model::Target
- Defined in:
- lib/ldclient-rb/impl/model/feature_flag.rb
Overview
Instance Attribute Summary collapse
- #data ⇒ Hash readonly
- #kind ⇒ String readonly
- #match_result ⇒ LaunchDarkly::EvaluationDetail readonly
- #values ⇒ Set readonly
- #variation ⇒ Integer readonly
Instance Method Summary collapse
-
#initialize(data, flag, logger) ⇒ Target
constructor
A new instance of Target.
Constructor Details
#initialize(data, flag, logger) ⇒ Target
Returns a new instance of Target.
115 116 117 118 119 120 121 122 |
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 115 def initialize(data, flag, logger) @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, logger) end |
Instance Attribute Details
#data ⇒ Hash (readonly)
127 128 129 |
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 127 def data @data end |
#kind ⇒ String (readonly)
125 126 127 |
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 125 def kind @kind end |
#match_result ⇒ LaunchDarkly::EvaluationDetail (readonly)
133 134 135 |
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 133 def match_result @match_result end |
#values ⇒ Set (readonly)
129 130 131 |
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 129 def values @values end |
#variation ⇒ Integer (readonly)
131 132 133 |
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 131 def variation @variation end |