Class: Kameleoon::Targeting::KcsHeatRangeCondition Private

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

KcsHeatRangeCondition is a condition for checking KCS heat

Instance Attribute Summary

Attributes inherited from Condition

#id, #include, #type

Instance Method Summary collapse

Constructor Details

#initialize(json_condition) ⇒ KcsHeatRangeCondition

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



10
11
12
13
14
15
16
# File 'lib/kameleoon/targeting/conditions/kcs_heat_range_condition.rb', line 10

def initialize(json_condition)
  super(json_condition)
  @goal_id = json_condition['goalId'] || -1
  @key_moment_id = json_condition['keyMomentId'] || -1
  @lower_bound = json_condition['lowerBound'] || Float::MAX
  @upper_bound = json_condition['upperBound'] || Float::MIN
end

Instance Method Details

#check(kcs_heat) ⇒ 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.



18
19
20
# File 'lib/kameleoon/targeting/conditions/kcs_heat_range_condition.rb', line 18

def check(kcs_heat)
  kcs_heat.is_a?(Kameleoon::KcsHeat) && check_targeting(kcs_heat)
end