Class: Kameleoon::DataManager::ForcedVariation

Inherits:
Object
  • Object
show all
Defined in:
lib/kameleoon/data/manager/forced_variation.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data_type, rule, var_by_exp) ⇒ ForcedVariation

Returns a new instance of ForcedVariation.



8
9
10
11
12
# File 'lib/kameleoon/data/manager/forced_variation.rb', line 8

def initialize(data_type, rule, var_by_exp)
  @instance = data_type
  @rule = rule
  @var_by_exp = var_by_exp
end

Instance Attribute Details

#assignment_timeObject (readonly)

Returns the value of attribute assignment_time.



6
7
8
# File 'lib/kameleoon/data/manager/forced_variation.rb', line 6

def assignment_time
  @assignment_time
end

#instanceObject (readonly)

Returns the value of attribute instance.



6
7
8
# File 'lib/kameleoon/data/manager/forced_variation.rb', line 6

def instance
  @instance
end

#ruleObject (readonly)

Returns the value of attribute rule.



6
7
8
# File 'lib/kameleoon/data/manager/forced_variation.rb', line 6

def rule
  @rule
end

#rule_typeObject (readonly)

Returns the value of attribute rule_type.



6
7
8
# File 'lib/kameleoon/data/manager/forced_variation.rb', line 6

def rule_type
  @rule_type
end

#var_by_expObject (readonly)

Returns the value of attribute var_by_exp.



6
7
8
# File 'lib/kameleoon/data/manager/forced_variation.rb', line 6

def var_by_exp
  @var_by_exp
end

Instance Method Details

#==(other) ⇒ Object



14
15
16
# File 'lib/kameleoon/data/manager/forced_variation.rb', line 14

def ==(other)
  (@rule == other.rule) && (@var_by_exp == other.var_by_exp)
end