class Shmidi::LedButton
Constants
- CTYPE
Attributes
led[R]
Public Class Methods
new(id, socket, channel, note, led_note = nil)
click to toggle source
Calls superclass method
Shmidi::Control::new
# File lib/shmidi/led_button.rb, line 7 def initialize(id, socket, channel, note, led_note = nil) super(id, socket, channel, note) @button = Button.new(id, socket, channel, note) @led = Led.new(id, socket, channel, led_note || note) @button.on_press(&lambda { |button| on_button_press(button) }) @button.on_release(&lambda { |button| on_button_release(button) }) end