Class: Pedalboard::Components::Led

Inherits:
BaseComponent show all
Defined in:
lib/pedalboard/components/led.rb

Instance Attribute Summary

Attributes inherited from BaseComponent

#pedalboard, #pin

Instance Method Summary collapse

Methods inherited from BaseComponent

#initialize

Constructor Details

This class inherits a constructor from Pedalboard::Components::BaseComponent

Instance Method Details

#light_if(condition) ⇒ Object



8
9
10
# File 'lib/pedalboard/components/led.rb', line 8

def light_if condition
  condition ? on : off
end

#offObject



12
13
14
# File 'lib/pedalboard/components/led.rb', line 12

def off
  dino_component.send :off
end

#onObject



16
17
18
# File 'lib/pedalboard/components/led.rb', line 16

def on
  dino_component.send :on
end