Rupower is UPower (http://upower.freedesktop.org) interface for Ruby, working for Battery and AC supply. The main use case is to get all information providing by appropriate UPower service as parsed, hard typing hash.
k-nowicki
gem "rupower", "~> 0.1.2"