Class: Optimizely::Decision
- Inherits:
-
Object
- Object
- Optimizely::Decision
- Defined in:
- lib/optimizely/event/entity/decision.rb
Instance Attribute Summary collapse
-
#campaign_id ⇒ Object
readonly
Returns the value of attribute campaign_id.
-
#experiment_id ⇒ Object
readonly
Returns the value of attribute experiment_id.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#variation_id ⇒ Object
readonly
Returns the value of attribute variation_id.
Instance Method Summary collapse
- #as_json ⇒ Object
-
#initialize(campaign_id:, experiment_id:, variation_id:, metadata:) ⇒ Decision
constructor
A new instance of Decision.
Constructor Details
#initialize(campaign_id:, experiment_id:, variation_id:, metadata:) ⇒ Decision
Returns a new instance of Decision.
22 23 24 25 26 27 |
# File 'lib/optimizely/event/entity/decision.rb', line 22 def initialize(campaign_id:, experiment_id:, variation_id:, metadata:) @campaign_id = campaign_id @experiment_id = experiment_id @variation_id = variation_id @metadata = end |
Instance Attribute Details
#campaign_id ⇒ Object (readonly)
Returns the value of attribute campaign_id.
20 21 22 |
# File 'lib/optimizely/event/entity/decision.rb', line 20 def campaign_id @campaign_id end |
#experiment_id ⇒ Object (readonly)
Returns the value of attribute experiment_id.
20 21 22 |
# File 'lib/optimizely/event/entity/decision.rb', line 20 def experiment_id @experiment_id end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
20 21 22 |
# File 'lib/optimizely/event/entity/decision.rb', line 20 def @metadata end |
#variation_id ⇒ Object (readonly)
Returns the value of attribute variation_id.
20 21 22 |
# File 'lib/optimizely/event/entity/decision.rb', line 20 def variation_id @variation_id end |
Instance Method Details
#as_json ⇒ Object
29 30 31 32 33 34 35 36 |
# File 'lib/optimizely/event/entity/decision.rb', line 29 def as_json { campaign_id: @campaign_id, experiment_id: @experiment_id, variation_id: @variation_id, metadata: @metadata } end |