Sha256: 58cdf4299c37b5e41b6e57e2039eeee12870673622886809b92cc10c7ae07247

Contents?: true

Size: 302 Bytes

Versions: 3

Compression:

Stored size: 302 Bytes

Contents

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

require 'cl'

class Base < Cl::Cmd
  abstract
end

class Add < Base
  register :add

  def run
    puts 'Success'
  end
end

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

# Output:
#
#   Success

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

# Output:
#
#   Unknown command: base

Version data entries

3 entries across 3 versions & 2 rubygems

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