Class: Kameleoon::KameleoonClient::EvaluatedExperiment
- Inherits:
-
Object
- Object
- Kameleoon::KameleoonClient::EvaluatedExperiment
- Defined in:
- lib/kameleoon/kameleoon_client.rb
Instance Attribute Summary collapse
-
#experiment ⇒ Object
readonly
Returns the value of attribute experiment.
-
#rule_type ⇒ Object
readonly
Returns the value of attribute rule_type.
-
#var_by_exp ⇒ Object
readonly
Returns the value of attribute var_by_exp.
Class Method Summary collapse
- .from_forced_experiment_variation(forced_variation) ⇒ Object
- .from_forced_variation(forced_variation) ⇒ Object
- .from_var_by_exp_rule(var_by_exp, rule) ⇒ Object
Instance Method Summary collapse
-
#initialize(var_by_exp, experiment, rule_type) ⇒ EvaluatedExperiment
constructor
A new instance of EvaluatedExperiment.
Constructor Details
#initialize(var_by_exp, experiment, rule_type) ⇒ EvaluatedExperiment
Returns a new instance of EvaluatedExperiment.
1273 1274 1275 1276 1277 |
# File 'lib/kameleoon/kameleoon_client.rb', line 1273 def initialize(var_by_exp, experiment, rule_type) @var_by_exp = var_by_exp @experiment = experiment @rule_type = rule_type end |
Instance Attribute Details
#experiment ⇒ Object (readonly)
Returns the value of attribute experiment.
1271 1272 1273 |
# File 'lib/kameleoon/kameleoon_client.rb', line 1271 def experiment @experiment end |
#rule_type ⇒ Object (readonly)
Returns the value of attribute rule_type.
1271 1272 1273 |
# File 'lib/kameleoon/kameleoon_client.rb', line 1271 def rule_type @rule_type end |
#var_by_exp ⇒ Object (readonly)
Returns the value of attribute var_by_exp.
1271 1272 1273 |
# File 'lib/kameleoon/kameleoon_client.rb', line 1271 def var_by_exp @var_by_exp end |
Class Method Details
.from_forced_experiment_variation(forced_variation) ⇒ Object
1291 1292 1293 |
# File 'lib/kameleoon/kameleoon_client.rb', line 1291 def self.from_forced_experiment_variation(forced_variation) EvaluatedExperiment.from_var_by_exp_rule(forced_variation.var_by_exp, forced_variation.rule) end |
.from_forced_variation(forced_variation) ⇒ Object
1283 1284 1285 1286 1287 1288 1289 |
# File 'lib/kameleoon/kameleoon_client.rb', line 1283 def self.from_forced_variation(forced_variation) if forced_variation.var_by_exp.nil? || forced_variation.rule.nil? nil else EvaluatedExperiment.from_var_by_exp_rule(forced_variation.var_by_exp, forced_variation.rule) end end |
.from_var_by_exp_rule(var_by_exp, rule) ⇒ Object
1279 1280 1281 |
# File 'lib/kameleoon/kameleoon_client.rb', line 1279 def self.from_var_by_exp_rule(var_by_exp, rule) EvaluatedExperiment.new(var_by_exp, rule.experiment, rule.type) end |