Module: Sevgi::CLI

Extended by:
CLI
Included in:
CLI
Defined in:
lib/sevgi/external/cli.rb

Constant Summary collapse

CLIError =
Class.new(Sevgi::Error)
PROGNAME =
"sevgi"
ENVVOMIT =
"SEVGI_VOMIT"

Instance Method Summary collapse

Instance Method Details

#call(argv) ⇒ Object



45
46
47
48
49
50
51
52
# File 'lib/sevgi/external/cli.rb', line 45

def call(argv)
  return puts(help)           if (options = Options.parse(argv)).help
  return puts(Sevgi::VERSION) if options.version

  run(file = argv.shift, options)
rescue Exception => e # rubocop:disable Lint/RescueException
  die(e, file, options)
end