Sha256: bc8dba29783a366fed885bce93d2cac493051eebdce68df85b1e599a1d2bbfec

Contents?: true

Size: 510 Bytes

Versions: 15

Compression:

Stored size: 510 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: opts, to: to, to?: to?
  end
end

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

# Output:
#
#   {:opts=>{:to=>"one"}, :to=>"one", :to?=>true}

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

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

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
cl-1.2.2 examples/readme/opts
cl-1.2.1 examples/readme/opts
cl-1.2.0 examples/readme/opts
cl-1.1.5 examples/readme/opts
cl-1.1.4 examples/readme/opts
cl-1.1.3 examples/readme/opts
cl-1.1.2 examples/readme/opts
cl-1.1.1 examples/readme/opts
cl-1.1.0 examples/readme/opts
cl-1.0.5 examples/readme/opts
cl-1.0.4 examples/readme/opts
cl-1.0.3 examples/readme/opts
cl-1.0.2 examples/readme/opts
cl-1.0.1 examples/readme/opts
cl-1.0.0 examples/readme/opts