Class: Opencdd::Cddal::SourceLocation
- Inherits:
-
Struct
- Object
- Struct
- Opencdd::Cddal::SourceLocation
- Defined in:
- lib/opencdd/cddal/builder.rb
Overview
Source location attached to every entity created from CDDAL for diagnostics (validator messages, error attribution, cross-file navigation in the editor).
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/opencdd/cddal/builder.rb', line 10 def file @file end |
#line ⇒ Object
Returns the value of attribute line
10 11 12 |
# File 'lib/opencdd/cddal/builder.rb', line 10 def line @line end |
Instance Method Details
#to_s ⇒ Object
11 12 13 |
# File 'lib/opencdd/cddal/builder.rb', line 11 def to_s "#{file}:#{line || '?'}" end |