Class: Smalruby::Hardware::Led

Inherits:
Smalrubot::Components::Led
  • Object
show all
Defined in:
lib/smalruby/hardware/led.rb

Overview

LEDを表現するクラス

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Led

Returns a new instance of Led.



8
9
10
# File 'lib/smalruby/hardware/led.rb', line 8

def initialize(options)
  super(board: world.board, pin: Pin.smalruby_to_smalrubot(options[:pin]))
end

Instance Method Details

#stopObject



20
21
22
# File 'lib/smalruby/hardware/led.rb', line 20

def stop
  turn_off
end