Class: StorageDataModel

Inherits:
Object
  • Object
show all
Defined in:
lib/wingify/models/storage/storage_data_model.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeStorageDataModel

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

#contextObject

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_idObject

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_keyObject

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_idObject

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_keyObject

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_idObject

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_keyObject

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_idObject

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