Module: Sevgi::Binaries::Igves Private

Extended by:
Igves
Included in:
Igves
Defined in:
lib/sevgi/binaries/igves.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 igves executable that converts SVG files into Sevgi DSL source.

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.

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

Parameters:

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

    command-line arguments

Returns:

  • (nil)

Raises:

  • (Sevgi::ArgumentError)

    when the SVG file cannot be found

  • (Sevgi::PanicError)

    when generated Ruby source cannot be formatted

  • (StandardError)

    when --exception or SEVGI_VOMIT requests raw errors

  • (SystemExit)

    when argv does not match [options...] [--] [file|-] or command-line usage aborts



72
73
74
75
76
# File 'lib/sevgi/binaries/igves.rb', line 72

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