class Object

Constants

STATUS

STATUS is used to buffer the state, since calling MacLight in vain would cause quite high CPU utilization by this process

Public Instance Methods

off() click to toggle source
# File bin/ioled, line 22
def off
  if STATUS[:wason]
    MacLight.all_leds(false)
    STATUS[:wason] = false
  end
end
on() click to toggle source
# File bin/ioled, line 29
def on
  if not STATUS[:wason]
    MacLight.all_leds(true)
    STATUS[:wason] = true
  end
end