Class: Lilac::CLI::SourceLocation
- Inherits:
-
Struct
- Object
- Struct
- Lilac::CLI::SourceLocation
- Defined in:
- lib/lilac/cli/source_location.rb
Overview
(file, line) pair that appears in every build-time error and
lint warning. Kept as one value so error/warning constructors take
a single at: kwarg instead of two, and so future additions
(column, snippet excerpt, end-line for ranges) can be tacked on
here without rippling through every raise site.
Instance Attribute Summary collapse
-
#file ⇒ Object
Returns the value of attribute file.
-
#line ⇒ Object
Returns the value of attribute line.
Instance Method Summary collapse
Instance Attribute Details
#file ⇒ Object
Returns the value of attribute file
10 11 12 |
# File 'lib/lilac/cli/source_location.rb', line 10 def file @file end |
#line ⇒ Object
Returns the value of attribute line
10 11 12 |
# File 'lib/lilac/cli/source_location.rb', line 10 def line @line end |
Instance Method Details
#to_s ⇒ Object
11 12 13 |
# File 'lib/lilac/cli/source_location.rb', line 11 def to_s "#{file}:#{line}" end |