Class: Kameleoon::Targeting::Condition Private
- Inherits:
-
Object
- Object
- Kameleoon::Targeting::Condition
- Defined in:
- lib/kameleoon/targeting/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.
Direct Known Subclasses
Instance Attribute Summary collapse
- #include ⇒ Object private
- #type ⇒ Object private
Instance Method Summary collapse
- #check(conditions) ⇒ 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.
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/kameleoon/targeting/condition.rb', line 9 def initialize(json_condition) if json_condition['targetingType'].nil? raise Exception::NotFoundError.new('targetingType'), 'targetingType missed' end @type = json_condition['targetingType'] if json_condition['include'].nil? && json_condition['isInclude'].nil? raise Exception::NotFoundError.new('include / isInclude missed'), 'include / isInclude missed' end @include = json_condition['include'] || json_condition['isInclude'] end |
Instance Attribute Details
#include ⇒ 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.
7 8 9 |
# File 'lib/kameleoon/targeting/condition.rb', line 7 def include @include end |
#type ⇒ 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.
7 8 9 |
# File 'lib/kameleoon/targeting/condition.rb', line 7 def type @type end |
Instance Method Details
#check(conditions) ⇒ 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.
23 24 25 |
# File 'lib/kameleoon/targeting/condition.rb', line 23 def check(conditions) raise "Todo: Implement check method in condition" end |