Class: Kameleoon::Targeting::StringValueCondition Private
- Defined in:
- lib/kameleoon/targeting/conditions/string_value_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.
StringValueCondition is a base class for all conditions where string comparison happens
Direct Known Subclasses
PageTitleCondition, PageUrlCondition, PreviousPageCondition, VisitorCodeCondition
Instance Attribute Summary
Attributes inherited from Condition
Instance Method Summary collapse
- #check(data) ⇒ Object private
-
#initialize(json_condition, value) ⇒ StringValueCondition
constructor
private
A new instance of StringValueCondition.
Constructor Details
#initialize(json_condition, value) ⇒ StringValueCondition
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 StringValueCondition.
11 12 13 14 15 |
# File 'lib/kameleoon/targeting/conditions/string_value_condition.rb', line 11 def initialize(json_condition, value) super(json_condition) @condition_value = value @operator = json_condition['matchType'] 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.
17 18 19 |
# File 'lib/kameleoon/targeting/conditions/string_value_condition.rb', line 17 def check(data) data.is_a?(String) && check_targeting(data) end |