Class: Kameleoon::Targeting::SdkLanguageCondition Private
- 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
Instance Method Summary collapse
- #check(data) ⇒ Object private
-
#initialize(json_condition) ⇒ SdkLanguageCondition
constructor
private
A new instance of SdkLanguageCondition.
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 |