Class: UHaul::CLI
- Inherits:
-
Object
- Object
- UHaul::CLI
- Defined in:
- lib/uhaul/cli.rb
Overview
Used when interacting with the library from the command line interface (CLI).
Usage:
cli = UHaul::CLI.new
cli.parse
Defined Under Namespace
Modules: Code
Instance Method Summary collapse
Instance Method Details
#parse(argv = ARGV) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/uhaul/cli.rb', line 19 def parse(argv = ARGV) parser.parse!(argv) command = argv.shift case command when 'crawl' then crawl(*argv) else warn("unsupported command=#{command.inspect}") exit(Code::ERROR) end end |