class Ev3dev::Battery
Constants
- PATH
Public Class Methods
new()
click to toggle source
Calls superclass method
# File lib/ev3dev/battery.rb, line 5 def initialize Dir.glob("#{PATH}/*").each do |path| if File.exist?("#{path}/voltage_now") super path return end end raise "couldn't find battery attributes" end