Class: Kameleoon::Targeting::PageTitleCondition Private
- Inherits:
-
StringValueCondition
- Object
- Condition
- StringValueCondition
- Kameleoon::Targeting::PageTitleCondition
- Defined in:
- lib/kameleoon/targeting/conditions/page_title_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.
PageTitleCondition is a condition for checking title of a page
Instance Attribute Summary
Attributes inherited from Condition
Instance Method Summary collapse
- #check(list_data) ⇒ Object private
-
#initialize(json_condition) ⇒ PageTitleCondition
constructor
private
A new instance of PageTitleCondition.
Constructor Details
#initialize(json_condition) ⇒ PageTitleCondition
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 PageTitleCondition.
11 12 13 |
# File 'lib/kameleoon/targeting/conditions/page_title_condition.rb', line 11 def initialize(json_condition) super(json_condition, json_condition['title']) 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/page_title_condition.rb', line 15 def check(list_data) page_view = get_last_targeting_data(list_data, Kameleoon::DataType::PAGE_VIEW) page_view && check_targeting(page_view.title) end |