class Shmidi::Switch
Constants
- CTYPE
Attributes
switch_state[R]
Public Class Methods
new(id, socket, channel, note, led_note = nil)
click to toggle source
Calls superclass method
Shmidi::LedButton::new
# File lib/shmidi/switch.rb, line 6 def initialize(id, socket, channel, note, led_note = nil) super(id, socket, channel, note, led_note) @switch_state = false @on_switch = [] end
Public Instance Methods
on_switch_state(&block)
click to toggle source
# File lib/shmidi/switch.rb, line 12 def on_switch_state(&block) @on_switch << block end