class Location
Represents a location in a source file.
Definitions
def initialize(path, line)
Initialize a new location.
Signature
-
parameter
path
String
The path to the source file.
-
parameter
line
Integer
The line number in the source file.
Implementation
def initialize(path, line)
@path = path
@line = line
end
attr :path
Signature
-
attribute
String
The path to the source file.
attr :line
Signature
-
attribute
Integer
The line number in the source file.
def to_s
Generate a string representation of the location.
Implementation
def to_s
"#{path}:#{line}"
end