Class: ConvertSdk::BucketedFeature
- Inherits:
-
Struct
- Object
- Struct
- ConvertSdk::BucketedFeature
- Defined in:
- lib/convert_sdk/bucketed_feature.rb
Overview
A successfully resolved feature — a frozen value object returned when a feature decision is made (the success counterpart to a Sentinel miss).
Implemented as a frozen Struct subclass (NOT Data.define, which requires
Ruby 3.2; this gem's floor is 3.1). Members are snake_case, aligned to the JS
BucketedFeature shape, verified against
javascript-sdk/packages/types/src/BucketedFeature.ts and the vendored
spec/fixtures/test-config.json feature entity. status holds a
FeatureStatus wire value; variables is the feature's variable map.
Instance Attribute Summary collapse
-
#experience_id ⇒ Object
Returns the value of attribute experience_id.
-
#experience_key ⇒ Object
Returns the value of attribute experience_key.
-
#experience_name ⇒ Object
Returns the value of attribute experience_name.
-
#id ⇒ Object
Returns the value of attribute id.
-
#key ⇒ Object
Returns the value of attribute key.
-
#name ⇒ Object
Returns the value of attribute name.
-
#status ⇒ Object
Returns the value of attribute status.
-
#variables ⇒ Object
Returns the value of attribute variables.
Instance Method Summary collapse
-
#error? ⇒ Boolean
Always false — a real decision is never a business miss.
-
#initialize ⇒ void
constructor
Builds the struct then freezes it (immutable value object).
Constructor Details
#initialize ⇒ void
Returns builds the struct then freezes it (immutable value object).
25 26 27 28 |
# File 'lib/convert_sdk/bucketed_feature.rb', line 25 def initialize(**) super freeze end |
Instance Attribute Details
#experience_id ⇒ Object
Returns the value of attribute experience_id
13 14 15 |
# File 'lib/convert_sdk/bucketed_feature.rb', line 13 def experience_id @experience_id end |
#experience_key ⇒ Object
Returns the value of attribute experience_key
13 14 15 |
# File 'lib/convert_sdk/bucketed_feature.rb', line 13 def experience_key @experience_key end |
#experience_name ⇒ Object
Returns the value of attribute experience_name
13 14 15 |
# File 'lib/convert_sdk/bucketed_feature.rb', line 13 def experience_name @experience_name end |
#id ⇒ Object
Returns the value of attribute id
13 14 15 |
# File 'lib/convert_sdk/bucketed_feature.rb', line 13 def id @id end |
#key ⇒ Object
Returns the value of attribute key
13 14 15 |
# File 'lib/convert_sdk/bucketed_feature.rb', line 13 def key @key end |
#name ⇒ Object
Returns the value of attribute name
13 14 15 |
# File 'lib/convert_sdk/bucketed_feature.rb', line 13 def name @name end |
#status ⇒ Object
Returns the value of attribute status
13 14 15 |
# File 'lib/convert_sdk/bucketed_feature.rb', line 13 def status @status end |
#variables ⇒ Object
Returns the value of attribute variables
13 14 15 |
# File 'lib/convert_sdk/bucketed_feature.rb', line 13 def variables @variables end |
Instance Method Details
#error? ⇒ Boolean
Returns always false — a real decision is never a business miss.
31 32 33 |
# File 'lib/convert_sdk/bucketed_feature.rb', line 31 def error? false end |