Module: Kameleoon::Targeting::ConditionFactory Private
- Included in:
- TreeBuilder
- Defined in:
- lib/kameleoon/targeting/condition_factory.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
Instance Method Details
#get_condition(condition_json) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/kameleoon/targeting/condition_factory.rb', line 9 def get_condition(condition_json) condition = nil case condition_json['targetingType'] when ConditionType::CUSTOM_DATUM.to_s condition = CustomDatum.new(condition_json) when ConditionType::TARGET_EXPERIMENT.to_s condition = TargetExperiment.new(condition_json) when ConditionType::EXCLUSIVE_EXPERIMENT.to_s condition = ExclusiveExperiment.new(condition_json) end condition end |