Class: Optimizely::Experiment
- Inherits:
-
Object
- Object
- Optimizely::Experiment
- Defined in:
- lib/optimizely/experiment.rb
Instance Attribute Summary collapse
-
#edit_url ⇒ Object
readonly
Returns the value of attribute edit_url.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#project_id ⇒ Object
readonly
Returns the value of attribute project_id.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#variation_ids ⇒ Object
readonly
Returns the value of attribute variation_ids.
Instance Method Summary collapse
- #[](x) ⇒ Object
-
#initialize(json) ⇒ Experiment
constructor
A new instance of Experiment.
Constructor Details
#initialize(json) ⇒ Experiment
Returns a new instance of Experiment.
6 7 8 9 10 11 12 13 |
# File 'lib/optimizely/experiment.rb', line 6 def initialize(json) @json = json @id = json['id'] @project_id = json['project_id'] @variation_ids = json['variation_ids'] @edit_url = json['edit_url'] @status = json['status'] end |
Instance Attribute Details
#edit_url ⇒ Object (readonly)
Returns the value of attribute edit_url.
4 5 6 |
# File 'lib/optimizely/experiment.rb', line 4 def edit_url @edit_url end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/optimizely/experiment.rb', line 4 def id @id end |
#project_id ⇒ Object (readonly)
Returns the value of attribute project_id.
4 5 6 |
# File 'lib/optimizely/experiment.rb', line 4 def project_id @project_id end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
4 5 6 |
# File 'lib/optimizely/experiment.rb', line 4 def status @status end |
#variation_ids ⇒ Object (readonly)
Returns the value of attribute variation_ids.
4 5 6 |
# File 'lib/optimizely/experiment.rb', line 4 def variation_ids @variation_ids end |
Instance Method Details
#[](x) ⇒ Object
15 16 17 |
# File 'lib/optimizely/experiment.rb', line 15 def [](x) return @json[x] end |