Class: Kameleoon::Targeting::Condition Private
- Inherits:
-
Object
- Object
- Kameleoon::Targeting::Condition
- Defined in:
- lib/kameleoon/targeting/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.
Base class for all targeting conditions
Direct Known Subclasses
BrowserCondition, ConversionCondition, CookieCondition, CustomDatum, DeviceCondition, ExclusiveFeatureFlagCondition, GeolocationCondition, KcsHeatRangeCondition, NumberCondition, OperatingSystemCondition, SdkLanguageCondition, SegmentCondition, StringValueCondition, TargetFeatureFlagCondition, UnknownCondition, VisitorNewReturnCondition
Instance Attribute Summary collapse
- #id ⇒ Object readonly private
- #include ⇒ Object readonly private
- #type ⇒ Object readonly private
Instance Method Summary collapse
- #check(_data) ⇒ Object private
-
#initialize(json_condition) ⇒ Condition
constructor
private
A new instance of Condition.
Constructor Details
#initialize(json_condition) ⇒ Condition
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 Condition.
53 54 55 56 57 58 59 |
# File 'lib/kameleoon/targeting/condition.rb', line 53 def initialize(json_condition) raise Exception::NotFound.new('targetingType'), 'targetingType missed' if json_condition['targetingType'].nil? @type = json_condition['targetingType'] @id = json_condition['id'] @include = json_condition['isInclude'].nil? ? true : json_condition['isInclude'] end |
Instance Attribute Details
#id ⇒ Object (readonly)
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.
51 52 53 |
# File 'lib/kameleoon/targeting/condition.rb', line 51 def id @id end |
#include ⇒ Object (readonly)
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.
51 52 53 |
# File 'lib/kameleoon/targeting/condition.rb', line 51 def include @include end |
#type ⇒ Object (readonly)
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.
51 52 53 |
# File 'lib/kameleoon/targeting/condition.rb', line 51 def type @type 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.
61 62 63 |
# File 'lib/kameleoon/targeting/condition.rb', line 61 def check(_data) raise 'Abstract method `check` call' end |