Class: ExternalPowerConstraint

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

Overview

Category: Battery/Power

Instance Attribute Summary

Attributes inherited from MacroObject

#options, #type

Instance Method Summary collapse

Methods inherited from Constraint

#match?

Methods inherited from MacroObject

#to_h

Constructor Details

#initialize(h = {}) ⇒ ExternalPowerConstraint

Returns a new instance of ExternalPowerConstraint.



3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
# File 'lib/ruby-macrodroid.rb', line 3184

def initialize(h={})

  options = {
    external_power: true,
    power_connected_options: [false, true, false]
  }

  super(options.merge h)

end