svenfuchs/cl

View on GitHub
examples/readme/deprecated

Summary

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

require 'cl'

class Add < Cl::Cmd
  register :add

  opt '--target GROUP', deprecated: 'Deprecated.'

  def run
    p target: target, deprecations: deprecations
  end
end

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

# Output:
#
#   {:target=>"one", :deprecations=>{:target=>"Deprecated."}}