Sha256: a5d162405a69e3c05166257721954e4e825aacf6b540f1bc852c5795e18d3613

Contents?: true

Size: 454 Bytes

Versions: 2

Compression:

Stored size: 454 Bytes

Contents

# -*- coding: utf-8 -*-
Usblamp::CLI.slop.command 'blink' do
  banner 'Usage: usblamp blink [OPTIONS]'
  description 'Blink effect'
  separator "\nOptions:\n"

  Usblamp::CLI.slop.options.each do |c|
    next if c.long == 'version'
    options << c
  end

  on :t=, :times=, 'Times', as: Integer, default: 2

  run do |opts, _args|
    lamp = Usblamp::Controller.new
    lamp.open
    lamp.switch_off
    lamp.blink(opts[:t], lamp.parse(opts))
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
usblamp-0.2.0 lib/usblamp/cli/blink.rb
usblamp-0.1.1 lib/usblamp/cli/blink.rb