Module: Sevgi::Binaries::Igsev Private

Extended by:
Igsev
Included in:
Igsev
Defined in:
lib/sevgi/binaries/igsev.rb

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 igsev executable that round-trips SVG files through Sevgi.

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.

"igsev"
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

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 igsev command-line interface.

Parameters:

  • argv (Array<String>, String, nil)

    command-line arguments

Returns:

  • (nil)

Raises:

  • (StandardError)

    when --exception or SEVGI_VOMIT requests raw errors

  • (SystemExit)

    when argv does not match [options...] [--] [file|-] or conversion aborts



74
75
76
77
78
# File 'lib/sevgi/binaries/igsev.rb', line 74

def call(argv)
  dispatch(Array(argv))
rescue Binaries::Igsev::Error => e
  abort("#{e.message}\n\n#{help}")
end