Class: Kameleoon::Targeting::SdkLanguageCondition Private

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

SdkLanguageCondition is a condition for checking targeting sdk type and version

Instance Attribute Summary

Attributes inherited from Condition

#id, #include, #type

Instance Method Summary collapse

Constructor Details

#initialize(json_condition) ⇒ SdkLanguageCondition

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



22
23
24
25
26
27
# File 'lib/kameleoon/targeting/conditions/sdk_language_condition.rb', line 22

def initialize(json_condition)
  super(json_condition)
  @sdk_language = json_condition['sdkLanguage']
  @version = json_condition['version']
  @operator = json_condition['versionMatchType']
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.



29
30
31
# File 'lib/kameleoon/targeting/conditions/sdk_language_condition.rb', line 29

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