Class: Hackle::RemoteConfigEvaluation
- Inherits:
-
EvaluatorEvaluation
- Object
- EvaluatorEvaluation
- Hackle::RemoteConfigEvaluation
- Defined in:
- lib/hackle/internal/evaluation/evaluator/remoteconfig/remote_config_evaluator.rb
Instance Attribute Summary collapse
- #parameter ⇒ RemoteConfigParameter readonly
- #properties ⇒ Hash<String => Object> readonly
- #value ⇒ Object readonly
- #value_id ⇒ Integer? readonly
Attributes inherited from EvaluatorEvaluation
Class Method Summary collapse
- .create(request, context, value_id, value, reason, properties_builder) ⇒ Object
- .create_default(request, context, reason, properties_builder) ⇒ Object
Instance Method Summary collapse
-
#initialize(reason:, target_evaluations:, parameter:, value_id:, value:, properties:) ⇒ RemoteConfigEvaluation
constructor
A new instance of RemoteConfigEvaluation.
Constructor Details
#initialize(reason:, target_evaluations:, parameter:, value_id:, value:, properties:) ⇒ RemoteConfigEvaluation
Returns a new instance of RemoteConfigEvaluation.
140 141 142 143 144 145 146 |
# File 'lib/hackle/internal/evaluation/evaluator/remoteconfig/remote_config_evaluator.rb', line 140 def initialize(reason:, target_evaluations:, parameter:, value_id:, value:, properties:) super(reason: reason, target_evaluations: target_evaluations) @parameter = parameter @value_id = value_id @value = value @properties = properties end |
Instance Attribute Details
#parameter ⇒ RemoteConfigParameter (readonly)
123 124 125 |
# File 'lib/hackle/internal/evaluation/evaluator/remoteconfig/remote_config_evaluator.rb', line 123 def parameter @parameter end |
#properties ⇒ Hash<String => Object> (readonly)
132 133 134 |
# File 'lib/hackle/internal/evaluation/evaluator/remoteconfig/remote_config_evaluator.rb', line 132 def properties @properties end |
#value ⇒ Object (readonly)
129 130 131 |
# File 'lib/hackle/internal/evaluation/evaluator/remoteconfig/remote_config_evaluator.rb', line 129 def value @value end |
#value_id ⇒ Integer? (readonly)
126 127 128 |
# File 'lib/hackle/internal/evaluation/evaluator/remoteconfig/remote_config_evaluator.rb', line 126 def value_id @value_id end |
Class Method Details
.create(request, context, value_id, value, reason, properties_builder) ⇒ Object
154 155 156 157 158 159 160 161 162 163 164 |
# File 'lib/hackle/internal/evaluation/evaluator/remoteconfig/remote_config_evaluator.rb', line 154 def self.create(request, context, value_id, value, reason, properties_builder) properties_builder.add('returnValue', value) RemoteConfigEvaluation.new( reason: reason, target_evaluations: context.evaluations, parameter: request.parameter, value_id: value_id, value: value, properties: properties_builder.build ) end |
.create_default(request, context, reason, properties_builder) ⇒ Object
170 171 172 |
# File 'lib/hackle/internal/evaluation/evaluator/remoteconfig/remote_config_evaluator.rb', line 170 def self.create_default(request, context, reason, properties_builder) create(request, context, nil, request.default_value, reason, properties_builder) end |