Module: Sevgi::Binaries::Sevgi
Overview
Implements the sevgi executable.
Constant Summary collapse
- PROGNAME =
Executable name used in help output.
"sevgi"- Error =
Error raised for invalid command-line usage.
Class.new(::Sevgi::Error)
Instance Method Summary collapse
-
#call(argv) ⇒ nil
Runs the
sevgicommand-line interface.
Instance Method Details
#call(argv) ⇒ nil
Runs the sevgi command-line interface.
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/sevgi/binaries/sevgi.rb', line 62 def call(argv) return puts(help) if ( = Options.parse(argv = Array(argv))).help return puts(::Sevgi::VERSION) if .version result = run(file = argv.shift, ) if result.error? raise result.error if .vomit || ENV[ENVVOMIT] die(result.error, file) end rescue Binaries::Sevgi::Error => e abort(e.) end |