Class: Featureflip::Models::EvaluationEvent
- Inherits:
-
Struct
- Object
- Struct
- Featureflip::Models::EvaluationEvent
- Defined in:
- lib/featureflip/models/evaluation_event.rb
Overview
The payload handed to every registered evaluation inspector, once per variation call. This is the frozen cross-SDK inspector contract (see docs/superpowers/specs/2026-07-13-sdk-onevaluation-inspector-design.md), spelled in Ruby snake_case:
flag_key the flag key evaluated
context the full evaluation context -- a copy, so mutating it
cannot affect the caller's hash
value the value the caller actually receives (default applied)
variation_key winning arm; nil on flag-not-found and on error
reason this SDK's native reason string (PascalCase, matching
EvaluationDetail#reason -- deliberately NOT converted)
rule_id set only on a rule match
prerequisite_key set only on a prerequisite failure
timestamp ISO-8601 string
Instance Attribute Summary collapse
-
#context ⇒ Object
Returns the value of attribute context.
-
#flag_key ⇒ Object
Returns the value of attribute flag_key.
-
#prerequisite_key ⇒ Object
Returns the value of attribute prerequisite_key.
-
#reason ⇒ Object
Returns the value of attribute reason.
-
#rule_id ⇒ Object
Returns the value of attribute rule_id.
-
#timestamp ⇒ Object
Returns the value of attribute timestamp.
-
#value ⇒ Object
Returns the value of attribute value.
-
#variation_key ⇒ Object
Returns the value of attribute variation_key.
Instance Method Summary collapse
-
#initialize(flag_key:, context:, value:, reason:, timestamp:, variation_key: nil, rule_id: nil, prerequisite_key: nil) ⇒ EvaluationEvent
constructor
A new instance of EvaluationEvent.
Constructor Details
#initialize(flag_key:, context:, value:, reason:, timestamp:, variation_key: nil, rule_id: nil, prerequisite_key: nil) ⇒ EvaluationEvent
Returns a new instance of EvaluationEvent.
23 24 25 26 |
# File 'lib/featureflip/models/evaluation_event.rb', line 23 def initialize(flag_key:, context:, value:, reason:, timestamp:, variation_key: nil, rule_id: nil, prerequisite_key: nil) super end |
Instance Attribute Details
#context ⇒ Object
Returns the value of attribute context
18 19 20 |
# File 'lib/featureflip/models/evaluation_event.rb', line 18 def context @context end |
#flag_key ⇒ Object
Returns the value of attribute flag_key
18 19 20 |
# File 'lib/featureflip/models/evaluation_event.rb', line 18 def flag_key @flag_key end |
#prerequisite_key ⇒ Object
Returns the value of attribute prerequisite_key
18 19 20 |
# File 'lib/featureflip/models/evaluation_event.rb', line 18 def prerequisite_key @prerequisite_key end |
#reason ⇒ Object
Returns the value of attribute reason
18 19 20 |
# File 'lib/featureflip/models/evaluation_event.rb', line 18 def reason @reason end |
#rule_id ⇒ Object
Returns the value of attribute rule_id
18 19 20 |
# File 'lib/featureflip/models/evaluation_event.rb', line 18 def rule_id @rule_id end |
#timestamp ⇒ Object
Returns the value of attribute timestamp
18 19 20 |
# File 'lib/featureflip/models/evaluation_event.rb', line 18 def @timestamp end |
#value ⇒ Object
Returns the value of attribute value
18 19 20 |
# File 'lib/featureflip/models/evaluation_event.rb', line 18 def value @value end |
#variation_key ⇒ Object
Returns the value of attribute variation_key
18 19 20 |
# File 'lib/featureflip/models/evaluation_event.rb', line 18 def variation_key @variation_key end |