svenfuchs/cl

View on GitHub
examples/readme/default

Summary

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

require 'cl'

class Add < Cl::Cmd
  register :add

  opt '--to GROUP', default: 'default'

  def run
    p to: to
  end
end

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

# Output:
#
#   {:to=>"default"}