Class: Kameleoon::DataManager::ForcedFeatureVariation
- Inherits:
-
ForcedVariation
- Object
- ForcedVariation
- Kameleoon::DataManager::ForcedFeatureVariation
- Defined in:
- lib/kameleoon/data/manager/forced_feature_variation.rb
Instance Attribute Summary collapse
-
#feature_key ⇒ Object
readonly
Returns the value of attribute feature_key.
-
#simulated ⇒ Object
readonly
Returns the value of attribute simulated.
Attributes inherited from ForcedVariation
#assignment_time, #instance, #rule, #rule_type, #var_by_exp
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(feature_key, rule, var_by_exp, simulated) ⇒ ForcedFeatureVariation
constructor
A new instance of ForcedFeatureVariation.
- #to_s ⇒ Object
Constructor Details
#initialize(feature_key, rule, var_by_exp, simulated) ⇒ ForcedFeatureVariation
Returns a new instance of ForcedFeatureVariation.
11 12 13 14 15 |
# File 'lib/kameleoon/data/manager/forced_feature_variation.rb', line 11 def initialize(feature_key, rule, var_by_exp, simulated) super(DataType::FORCED_FEATURE_VARIATION, rule, var_by_exp) @feature_key = feature_key @simulated = simulated end |
Instance Attribute Details
#feature_key ⇒ Object (readonly)
Returns the value of attribute feature_key.
9 10 11 |
# File 'lib/kameleoon/data/manager/forced_feature_variation.rb', line 9 def feature_key @feature_key end |
#simulated ⇒ Object (readonly)
Returns the value of attribute simulated.
9 10 11 |
# File 'lib/kameleoon/data/manager/forced_feature_variation.rb', line 9 def simulated @simulated end |
Instance Method Details
#==(other) ⇒ Object
17 18 19 20 |
# File 'lib/kameleoon/data/manager/forced_feature_variation.rb', line 17 def ==(other) super(other) && other.is_a?(ForcedFeatureVariation) && \ (@feature_key == other.feature_key) && (@simulated == other.simulated) end |
#to_s ⇒ Object
22 23 24 25 |
# File 'lib/kameleoon/data/manager/forced_feature_variation.rb', line 22 def to_s "ForcedFeatureVariation{feature_key:'#{@feature_key}',rule:#{@rule}," \ "var_by_exp:#{@var_by_exp},simulated:#{@simulated}}" end |