Class: Kameleoon::Targeting::VisitNumberTotalCondition Private
- Inherits:
-
NumberCondition
- Object
- Condition
- NumberCondition
- Kameleoon::Targeting::VisitNumberTotalCondition
- Defined in:
- lib/kameleoon/targeting/conditions/visit_number_total_condition.rb
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.
Instance Attribute Summary
Attributes inherited from Condition
Instance Method Summary collapse
- #check(data) ⇒ Object private
-
#initialize(json_condition) ⇒ VisitNumberTotalCondition
constructor
private
A new instance of VisitNumberTotalCondition.
Constructor Details
#initialize(json_condition) ⇒ VisitNumberTotalCondition
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 VisitNumberTotalCondition.
10 11 12 13 |
# File 'lib/kameleoon/targeting/conditions/visit_number_total_condition.rb', line 10 def initialize(json_condition) visit_count = json_condition['visitCount'] super(json_condition, visit_count) end |
Instance Method Details
#check(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 19 20 |
# File 'lib/kameleoon/targeting/conditions/visit_number_total_condition.rb', line 15 def check(data) return false unless VisitorVisits.visitor_visits?(data) && !@condition_value.nil? = VisitorVisits.(data) check_targeting(.size + 1) # +1 for current visit end |