Method: LinuxStat::Battery.full?
- Defined in:
- lib/linux_stat/battery.rb
.full? ⇒ Boolean
Returns true if the battery status if full, false if the battery status is not full.
If the battery is not present or the information is not available, it will return nil.
98 99 100 101 |
# File 'lib/linux_stat/battery.rb', line 98 def full? return nil if status.empty? status.downcase == 'full'.freeze end |