class Led
Public Class Methods
new(parent)
click to toggle source
# File lib/simple_wiimote.rb, line 11 def initialize(parent) @parent = parent end
Public Instance Methods
state()
click to toggle source
# File lib/simple_wiimote.rb, line 15 def state() @on ? 1 : 0 end
Protected Instance Methods
set_pin(val)
click to toggle source
set val with 0 (off) or 1 (on)
Calls superclass method
# File lib/simple_wiimote.rb, line 23 def set_pin(val) super(val) @parent.on_ledchange end