Module: Sysdo::SourceLibrary::Battery

Defined in:
lib/sysdo/source_library/battery.rb

Class Method Summary collapse

Class Method Details

.charger_connectedObject



4
5
6
# File 'lib/sysdo/source_library/battery.rb', line 4

def self.charger_connected
  EventSource::PolledEqualChange.new(true) { charger_connected? }
end

.charger_disconnectedObject



8
9
10
# File 'lib/sysdo/source_library/battery.rb', line 8

def self.charger_disconnected
  EventSource::PolledEqualChange.new(false) { charger_connected? }
end