Class: Kameleoon::Targeting::OperatingSystemCondition Private
- Defined in:
- lib/kameleoon/targeting/conditions/operating_system_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
Instance Method Summary collapse
- #check(operating_system) ⇒ Object private
-
#initialize(json_condition) ⇒ OperatingSystemCondition
constructor
private
A new instance of OperatingSystemCondition.
Constructor Details
#initialize(json_condition) ⇒ OperatingSystemCondition
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 OperatingSystemCondition.
10 11 12 13 |
# File 'lib/kameleoon/targeting/conditions/operating_system_condition.rb', line 10 def initialize(json_condition) super(json_condition) @os_type = Kameleoon::OperatingSystemType.from_name(json_condition['os']) end |
Instance Method Details
#check(operating_system) ⇒ 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/operating_system_condition.rb', line 15 def check() .is_a?(Kameleoon::OperatingSystem) && check_targeting() end |