Class: StorageDataModel
- Inherits:
-
Object
- Object
- StorageDataModel
- Defined in:
- lib/wingify/models/storage/storage_data_model.rb
Instance Attribute Summary collapse
-
#context ⇒ Object
Returns the value of attribute context.
-
#experiment_id ⇒ Object
Returns the value of attribute experiment_id.
-
#experiment_key ⇒ Object
Returns the value of attribute experiment_key.
-
#experiment_variation_id ⇒ Object
Returns the value of attribute experiment_variation_id.
-
#feature_key ⇒ Object
Returns the value of attribute feature_key.
-
#rollout_id ⇒ Object
Returns the value of attribute rollout_id.
-
#rollout_key ⇒ Object
Returns the value of attribute rollout_key.
-
#rollout_variation_id ⇒ Object
Returns the value of attribute rollout_variation_id.
Instance Method Summary collapse
-
#initialize ⇒ StorageDataModel
constructor
A new instance of StorageDataModel.
-
#model_from_dictionary(storage_data) ⇒ Object
Creates a model instance from a hash (dictionary).
Constructor Details
#initialize ⇒ StorageDataModel
Returns a new instance of StorageDataModel.
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/wingify/models/storage/storage_data_model.rb', line 21 def initialize @feature_key = '' @context = nil @rollout_id = nil @rollout_key = '' @rollout_variation_id = nil @experiment_id = nil @experiment_key = '' @experiment_variation_id = nil end |
Instance Attribute Details
#context ⇒ Object
Returns the value of attribute context.
18 19 20 |
# File 'lib/wingify/models/storage/storage_data_model.rb', line 18 def context @context end |
#experiment_id ⇒ Object
Returns the value of attribute experiment_id.
18 19 20 |
# File 'lib/wingify/models/storage/storage_data_model.rb', line 18 def experiment_id @experiment_id end |
#experiment_key ⇒ Object
Returns the value of attribute experiment_key.
18 19 20 |
# File 'lib/wingify/models/storage/storage_data_model.rb', line 18 def experiment_key @experiment_key end |
#experiment_variation_id ⇒ Object
Returns the value of attribute experiment_variation_id.
18 19 20 |
# File 'lib/wingify/models/storage/storage_data_model.rb', line 18 def experiment_variation_id @experiment_variation_id end |
#feature_key ⇒ Object
Returns the value of attribute feature_key.
18 19 20 |
# File 'lib/wingify/models/storage/storage_data_model.rb', line 18 def feature_key @feature_key end |
#rollout_id ⇒ Object
Returns the value of attribute rollout_id.
18 19 20 |
# File 'lib/wingify/models/storage/storage_data_model.rb', line 18 def rollout_id @rollout_id end |
#rollout_key ⇒ Object
Returns the value of attribute rollout_key.
18 19 20 |
# File 'lib/wingify/models/storage/storage_data_model.rb', line 18 def rollout_key @rollout_key end |
#rollout_variation_id ⇒ Object
Returns the value of attribute rollout_variation_id.
18 19 20 |
# File 'lib/wingify/models/storage/storage_data_model.rb', line 18 def rollout_variation_id @rollout_variation_id end |
Instance Method Details
#model_from_dictionary(storage_data) ⇒ Object
Creates a model instance from a hash (dictionary)
33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/wingify/models/storage/storage_data_model.rb', line 33 def model_from_dictionary(storage_data) @feature_key = storage_data[:feature_key] @context = storage_data[:context] @rollout_id = storage_data[:rollout_id] @rollout_key = storage_data[:rollout_key] @rollout_variation_id = storage_data[:rollout_variation_id] @experiment_id = storage_data[:experiment_id] @experiment_key = storage_data[:experiment_key] @experiment_variation_id = storage_data[:experiment_variation_id] self end |