Class: LaunchDarkly::Impl::Model::Prerequisite
- Inherits:
-
Object
- Object
- LaunchDarkly::Impl::Model::Prerequisite
- Defined in:
- lib/ldclient-rb/impl/model/feature_flag.rb
Overview
Instance Attribute Summary collapse
- #data ⇒ Hash readonly
- #failure_result ⇒ LaunchDarkly::EvaluationDetail readonly
- #key ⇒ String readonly
- #variation ⇒ Integer readonly
Instance Method Summary collapse
-
#initialize(data, flag, errors_out = nil) ⇒ Prerequisite
constructor
A new instance of Prerequisite.
Constructor Details
#initialize(data, flag, errors_out = nil) ⇒ Prerequisite
Returns a new instance of Prerequisite.
121 122 123 124 125 126 127 128 |
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 121 def initialize(data, flag, errors_out = nil) @data = data @key = data[:key] @variation = data[:variation] @failure_result = EvaluatorHelpers.evaluation_detail_for_off_variation(flag, EvaluationReason::prerequisite_failed(@key)) check_variation_range(flag, errors_out, @variation, "prerequisite") end |
Instance Attribute Details
#data ⇒ Hash (readonly)
131 132 133 |
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 131 def data @data end |
#failure_result ⇒ LaunchDarkly::EvaluationDetail (readonly)
137 138 139 |
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 137 def failure_result @failure_result end |
#key ⇒ String (readonly)
133 134 135 |
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 133 def key @key end |
#variation ⇒ Integer (readonly)
135 136 137 |
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 135 def variation @variation end |