struct

Spectator::Source

Inherits Struct < Value < Object

Define the file and line number something originated from.

Constructors

new(file : String, line : Int32)

Creates the source.

Source

Class methods

parse(string)

Parses a source from a string.

Source

Instance methods

file

Absolute file path.

Source
line

Line number in the file.

Source
path

The relative path to the file from the current directory. If the file isn't in the current directory or a sub-directory, then the absolute path is provided.

Source
to_json(json : JSON::Builder)

Creates the JSON representation of the source.

Source
to_s(io)

String representation of the source. This is formatted as:

FILE:LINE
Source