Class: EvaluationReason
- Inherits:
-
Object
- Object
- EvaluationReason
- Defined in:
- lib/posthog/feature_flag.rb
Overview
Represents the reason why a flag was enabled/disabled
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#condition_index ⇒ Object
readonly
Returns the value of attribute condition_index.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
Instance Method Summary collapse
-
#initialize(json) ⇒ EvaluationReason
constructor
A new instance of EvaluationReason.
Constructor Details
#initialize(json) ⇒ EvaluationReason
Returns a new instance of EvaluationReason.
42 43 44 45 46 47 |
# File 'lib/posthog/feature_flag.rb', line 42 def initialize(json) json.transform_keys!(&:to_s) @code = json["code"] @description = json["description"] @condition_index = json["condition_index"]&.to_i if json["condition_index"] end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
40 41 42 |
# File 'lib/posthog/feature_flag.rb', line 40 def code @code end |
#condition_index ⇒ Object (readonly)
Returns the value of attribute condition_index.
40 41 42 |
# File 'lib/posthog/feature_flag.rb', line 40 def condition_index @condition_index end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
40 41 42 |
# File 'lib/posthog/feature_flag.rb', line 40 def description @description end |