Class: Kameleoon::DataManager::ForcedExperimentVariation

Inherits:
ForcedVariation show all
Defined in:
lib/kameleoon/data/manager/forced_experiment_variation.rb

Instance Attribute Summary collapse

Attributes inherited from ForcedVariation

#assignment_time, #instance, #rule, #rule_type, #var_by_exp

Instance Method Summary collapse

Constructor Details

#initialize(rule, var_by_exp, force_targeting) ⇒ ForcedExperimentVariation

Returns a new instance of ForcedExperimentVariation.



11
12
13
14
# File 'lib/kameleoon/data/manager/forced_experiment_variation.rb', line 11

def initialize(rule, var_by_exp, force_targeting)
  super(DataType::FORCED_EXPERIMENT_VARIATION, rule, var_by_exp)
  @force_targeting = force_targeting
end

Instance Attribute Details

#force_targetingObject (readonly)

Returns the value of attribute force_targeting.



9
10
11
# File 'lib/kameleoon/data/manager/forced_experiment_variation.rb', line 9

def force_targeting
  @force_targeting
end

Instance Method Details

#==(other) ⇒ Object



16
17
18
# File 'lib/kameleoon/data/manager/forced_experiment_variation.rb', line 16

def ==(other)
  super(other) && other.is_a?(ForcedExperimentVariation) && (@force_targeting == other.force_targeting)
end

#to_sObject



20
21
22
# File 'lib/kameleoon/data/manager/forced_experiment_variation.rb', line 20

def to_s
  "ForcedExperimentVariation{rule:#{@rule},var_by_exp:#{@var_by_exp},force_targeting:#{@force_targeting}}"
end