Sha256: 51e2faac8a1af11d8439001e462b7013e20a4cdba91422d5c9484c6fc120fbdc
Contents?: true
Size: 527 Bytes
Versions: 22
Compression:
Stored size: 527 Bytes
Contents
# -*- coding: utf-8 -*- require 'smalruby/hardware' module Smalruby module Hardware # LEDを表現するクラス class Led < Smalrubot::Components::Led def initialize(options) super(board: world.board, pin: Pin.smalruby_to_smalrubot(options[:pin])) end # @!method turn_on # LEDをオンにする alias_method :turn_on, :on # @!method turn_off # LEDをオフにする alias_method :turn_off, :off def stop turn_off end end end end
Version data entries
22 entries across 22 versions & 1 rubygems