class ExternalPowerConstraint
Category: Battery/Power
Public Class Methods
new(h={})
click to toggle source
Calls superclass method
Constraint::new
# File lib/ruby-macrodroid/constraints.rb, line 176 def initialize(h={}) options = { external_power: true, power_connected_options: [false, true, false] } super(options.merge h) end
Public Instance Methods
to_s(colour: false, indent: 0)
click to toggle source
# File lib/ruby-macrodroid/constraints.rb, line 187 def to_s(colour: false, indent: 0) connection = @h[:external_power] ? 'Connected' : 'Disconnected' 'Power ' + connection end