Module: Sevgi

Extended by:
Toplevel
Defined in:
lib/sevgi.rb,
lib/sevgi/version.rb,
lib/sevgi/executor.rb,
lib/sevgi/toplevel.rb,
lib/sevgi/binaries/sevgi.rb,
lib/sevgi/executor/error.rb,
lib/sevgi/executor/scope.rb,
lib/sevgi/executor/source.rb,
lib/sevgi/toplevel/derender.rb,
lib/sevgi/toplevel/executor.rb,
lib/sevgi/toplevel/function.rb,
lib/sevgi/toplevel/geometry.rb,
lib/sevgi/toplevel/graphics.rb,
lib/sevgi/toplevel/sundries.rb

Overview

Full top-level API for Sevgi library and script consumers.

Including or extending this module installs DSL methods such as Paper, Load, and Grid, plus convenience constants such as F, Geometry, Origin, and Export.

Examples:

Include the DSL in an object

class Drawing
  include Sevgi
end

Defined Under Namespace

Modules: Binaries, Toplevel Classes: Executor

Constant Summary collapse

VERSION =

Current version of the Sevgi top-level gem.

"0.93.1"

Class Method Summary collapse

Methods included from Toplevel

Decompile, Derender, Grid, Load, Mixin, Paper, Paper!

Class Method Details

.execute(*args, **kwargs) ⇒ Sevgi::Executor::Scope?

Executes Sevgi script source with the full top-level DSL installed.

Parameters:

Returns:

Raises:

  • (LoadError)

    when the optional require: library cannot be loaded

See Also:



16
# File 'lib/sevgi/toplevel/executor.rb', line 16

def self.execute(*args, **kwargs) = Executor.execute(*args, **kwargs, &BootBlock)

.execute_file(*args, **kwargs) ⇒ Sevgi::Executor::Scope?

Executes a Sevgi script file with the full top-level DSL installed.

Parameters:

Returns:

Raises:

  • (Errno::ENOENT)

    when the file cannot be read

  • (LoadError)

    when the optional require: library cannot be loaded

See Also:



25
# File 'lib/sevgi/toplevel/executor.rb', line 25

def self.execute_file(*args, **kwargs) = Executor.execute_file(*args, **kwargs, &BootBlock)

.extended(base) ⇒ void

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.

This method returns an undefined value.

Installs the full toplevel DSL into an extending object or module.

Parameters:

  • base (Object)

    the receiver extended with the DSL methods



54
55
56
57
# File 'lib/sevgi.rb', line 54

def self.extended(base)
  super
  base.extend(Toplevel)
end

.included(base) ⇒ void

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.

This method returns an undefined value.

Installs the full toplevel DSL into an including class or module.

Parameters:

  • base (Module)

    the class or module receiving the DSL methods



45
46
47
48
# File 'lib/sevgi.rb', line 45

def self.included(base)
  super
  base.include(Toplevel)
end