Sha256: 2b9c7cbea4553959299d9a0da119690c77b9595a5574caaa3e7e99797a60f503

Contents?: true

Size: 380 Bytes

Versions: 3

Compression:

Stored size: 380 Bytes

Contents

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

require 'cl'

class Add < Cl::Cmd
  register :add

  opt '--to GROUP', alias: :group

  def run
    # p opts: opts, to: to, to?: to?, group: group, group?: group?
    p opts: opts, to: to, to?: to?
  end
end

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

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

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
travis-cl-1.2.4 examples/readme/alias
cl-1.2.4 examples/readme/alias
cl-1.2.3 examples/readme/alias