Class: BatteryTemperatureConstraint

Inherits:
Constraint show all
Defined in:
lib/ruby-macrodroid/constraints.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.



153
154
155
156
157
158
159
160
161
162
163
# File 'lib/ruby-macrodroid/constraints.rb', line 153

def initialize(h={})

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

  super(options.merge h)

end

Instance Method Details

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



165
166
167
# File 'lib/ruby-macrodroid/constraints.rb', line 165

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