Class: Kameleoon::Targeting::ConversionCondition Private
- Defined in:
- lib/kameleoon/targeting/conditions/conversion_condition.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
ConversionCondition is a condition for checking targeting of conversions of visitor
Instance Attribute Summary
Attributes inherited from Condition
Instance Method Summary collapse
- #check(list_data) ⇒ Object private
-
#initialize(json_condition) ⇒ ConversionCondition
constructor
private
A new instance of ConversionCondition.
Constructor Details
#initialize(json_condition) ⇒ ConversionCondition
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.
Returns a new instance of ConversionCondition.
10 11 12 13 |
# File 'lib/kameleoon/targeting/conditions/conversion_condition.rb', line 10 def initialize(json_condition) super(json_condition) @goal_id = json_condition['goalId'] end |
Instance Method Details
#check(list_data) ⇒ 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.
15 16 17 18 |
# File 'lib/kameleoon/targeting/conditions/conversion_condition.rb', line 15 def check(list_data) conversion = get_last_targeting_data(list_data, Kameleoon::DataType::CONVERSION) conversion && (@goal_id.nil? || @goal_id == conversion.goal_id) end |