Class: Kameleoon::Targeting::SegmentCondition Private

Inherits:
Condition
  • Object
show all
Defined in:
lib/kameleoon/targeting/conditions/segment_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

#id, #include, #type

Instance Method Summary collapse

Constructor Details

#initialize(json_condition) ⇒ SegmentCondition

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 SegmentCondition.



10
11
12
13
# File 'lib/kameleoon/targeting/conditions/segment_condition.rb', line 10

def initialize(json_condition)
  super(json_condition)
  @segment_id = json_condition['segmentId']
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.



15
16
17
# File 'lib/kameleoon/targeting/conditions/segment_condition.rb', line 15

def check(data)
  data.is_a?(SegmentInfo) && check_targeting(data)
end