Class: Kameleoon::Targeting::CookieCondition Private
- Defined in:
- lib/kameleoon/targeting/conditions/cookie_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(cookie) ⇒ Object private
-
#initialize(json_condition) ⇒ CookieCondition
constructor
private
A new instance of CookieCondition.
Constructor Details
#initialize(json_condition) ⇒ CookieCondition
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 CookieCondition.
11 12 13 14 15 16 17 |
# File 'lib/kameleoon/targeting/conditions/cookie_condition.rb', line 11 def initialize(json_condition) super(json_condition) @condition_name = json_condition['name'] @name_match_type = json_condition['nameMatchType'] @condition_value = json_condition['value'] @value_match_type = json_condition['valueMatchType'] end |
Instance Method Details
#check(cookie) ⇒ 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.
19 20 21 |
# File 'lib/kameleoon/targeting/conditions/cookie_condition.rb', line 19 def check() .is_a?(Kameleoon::Cookie) && check_values(select_values()) end |