Sha256: b691ccf1345ec1e91e9136f555d985e1ad429bc32778e9ceab807398c9309c16

Contents?: true

Size: 462 Bytes

Versions: 16

Compression:

Stored size: 462 Bytes

Contents

#!/usr/bin/env ruby
$: << File.expand_path('lib')

require 'cl'

class Add < Cl::Cmd
  opt '--to GROUP', 'Target group to add owners to'

  def run
    p opts, to, to?
  end
end

Cl.new('owners').run(%w(add --to one))

# Output:
#
#   {"to" => "one"}
#   "one"
#   true

Cl.new('owners').run(%w(add --help))

# Usage: opts add [options]
#
# Options:
#
#   --to GROUP      Target group to add owners to (type: string)
#   --help          Get help on this command

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
cl-0.1.28 examples/readme/opts
cl-0.1.27 examples/readme/opts
cl-0.1.26 examples/readme/opts
cl-0.1.25 examples/readme/opts
cl-0.1.24 examples/readme/opts
cl-0.1.23 examples/readme/opts
cl-0.1.22 examples/readme/opts
cl-0.1.21 examples/readme/opts
cl-0.1.20 examples/readme/opts
cl-0.1.19 examples/readme/opts
cl-0.1.18 examples/readme/opts
cl-0.1.17 examples/readme/opts
cl-0.1.16 examples/readme/opts
cl-0.1.15 examples/readme/opts
cl-0.1.14 examples/readme/opts
cl-0.1.13 examples/readme/opts