Class: Rupower::Battery
Constant Summary
collapse
- METHODS =
[:native_path, :vendor, :model, :serial, :power_supply, :updated,
:has_history, :has_statistics, :present, :rechargeable, :state,
:energy, :energy_empty, :energy_full, :energy_full_design,
:energy_rate, :voltage, :percentage, :capacity, :technology]
Instance Method Summary
collapse
Methods inherited from PowerDevice
#get_all, #initialize
Instance Method Details
#charging? ⇒ Boolean
67
68
69
|
# File 'lib/rupower.rb', line 67
def charging?
get_all[:state] == "charging"
end
|
#fully_charged? ⇒ Boolean
71
72
73
|
# File 'lib/rupower.rb', line 71
def fully_charged?
get_all[:state] == "fully-charged"
end
|
#refresh ⇒ Object
63
64
65
|
# File 'lib/rupower.rb', line 63
def refresh()
@state = @command.battery
end
|