Class: BatteryTemperatureConstraint

Inherits:
Constraint show all
Defined in:
lib/ruby-macrodroid.rb

Overview

Category: Battery/Power

Instance Attribute Summary

Attributes inherited from MacroObject

#options, #siguid, #type

Instance Method Summary collapse

Methods inherited from Constraint

#match?

Methods inherited from MacroObject

#to_h

Constructor Details

#initialize(h = {}) ⇒ BatteryTemperatureConstraint

Returns a new instance of BatteryTemperatureConstraint.



4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
# File 'lib/ruby-macrodroid.rb', line 4834

def initialize(h={})

  options = {
    equals: false,
    greater_than: false,
    temperature: 30
  }

  super(options.merge h)

end

Instance Method Details

#to_s(colour: false) ⇒ Object Also known as: to_summary



4846
4847
4848
# File 'lib/ruby-macrodroid.rb', line 4846

def to_s(colour: false)
  'BatteryTemperatureConstraint ' + @h.inspect
end