Class: Moult::Span
- Inherits:
-
Struct
- Object
- Struct
- Moult::Span
- Defined in:
- lib/moult/span.rb
Overview
A source location range for a definition. Lines are 1-based, columns are 0-based, matching Prism's location offsets. Part of the protected JSON contract and a component of a method's Phase 3 coverage join key.
Instance Attribute Summary collapse
-
#end_column ⇒ Object
Returns the value of attribute end_column.
-
#end_line ⇒ Object
Returns the value of attribute end_line.
-
#start_column ⇒ Object
Returns the value of attribute start_column.
-
#start_line ⇒ Object
Returns the value of attribute start_line.
Instance Method Summary collapse
Instance Attribute Details
#end_column ⇒ Object
Returns the value of attribute end_column
7 8 9 |
# File 'lib/moult/span.rb', line 7 def end_column @end_column end |
#end_line ⇒ Object
Returns the value of attribute end_line
7 8 9 |
# File 'lib/moult/span.rb', line 7 def end_line @end_line end |
#start_column ⇒ Object
Returns the value of attribute start_column
7 8 9 |
# File 'lib/moult/span.rb', line 7 def start_column @start_column end |
#start_line ⇒ Object
Returns the value of attribute start_line
7 8 9 |
# File 'lib/moult/span.rb', line 7 def start_line @start_line end |
Instance Method Details
#to_h ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/moult/span.rb', line 8 def to_h { start_line: start_line, start_column: start_column, end_line: end_line, end_column: end_column } end |