Module: Sevgi::Binaries::Sevgi Private
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Implements the sevgi executable.
Constant Summary collapse
- PROGNAME =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Executable name used in help output.
"sevgi"- Error =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Error raised for invalid command-line usage.
Class.new(::Sevgi::Error)
Instance Method Summary collapse
-
#call(argv) ⇒ nil
private
Runs the
sevgicommand-line interface.
Instance Method Details
#call(argv) ⇒ nil
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Runs the sevgi command-line interface.
80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/sevgi/binaries/sevgi.rb', line 80 def call(argv) return puts(help) if ( = Options.parse(argv = Array(argv))).help return puts(Skill.path) if .skill return puts(::Sevgi::VERSION) if .version file = operand(argv) handle(run(file, ), file, ) rescue Skill::Error => e abort(e.) rescue Binaries::Sevgi::Error => e abort("#{e.}\n\n#{help}") end |