Class: PostHog::EvaluationReason
- Inherits:
-
Object
- Object
- PostHog::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.
46 47 48 49 50 51 |
# File 'lib/posthog/feature_flag.rb', line 46 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.
44 45 46 |
# File 'lib/posthog/feature_flag.rb', line 44 def code @code end |
#condition_index ⇒ Object (readonly)
Returns the value of attribute condition_index.
44 45 46 |
# File 'lib/posthog/feature_flag.rb', line 44 def condition_index @condition_index end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
44 45 46 |
# File 'lib/posthog/feature_flag.rb', line 44 def description @description end |