Class: ExternalPowerConstraint
- Inherits:
-
Constraint
- Object
- MacroObject
- Constraint
- ExternalPowerConstraint
- Defined in:
- lib/ruby-macrodroid.rb
Overview
Category: Battery/Power
Instance Attribute Summary
Attributes inherited from MacroObject
Instance Method Summary collapse
-
#initialize(h = {}) ⇒ ExternalPowerConstraint
constructor
A new instance of ExternalPowerConstraint.
- #to_s ⇒ Object
Methods inherited from Constraint
Methods inherited from MacroObject
Constructor Details
#initialize(h = {}) ⇒ ExternalPowerConstraint
Returns a new instance of ExternalPowerConstraint.
4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 |
# File 'lib/ruby-macrodroid.rb', line 4218 def initialize(h={}) = { external_power: true, power_connected_options: [false, true, false] } super(.merge h) end |
Instance Method Details
#to_s ⇒ Object
4229 4230 4231 4232 |
# File 'lib/ruby-macrodroid.rb', line 4229 def to_s() connection = @h[:external_power] ? 'Connected' : 'Disconnected' 'Power ' + connection end |