Class: SixthSense::SourceLocation
- Inherits:
-
Struct
- Object
- Struct
- SixthSense::SourceLocation
- Defined in:
- lib/sixth_sense/source_location.rb
Instance Attribute Summary collapse
-
#column ⇒ Object
Returns the value of attribute column.
-
#line ⇒ Object
Returns the value of attribute line.
-
#path ⇒ Object
Returns the value of attribute path.
Instance Method Summary collapse
Instance Attribute Details
#column ⇒ Object
Returns the value of attribute column
4 5 6 |
# File 'lib/sixth_sense/source_location.rb', line 4 def column @column end |
#line ⇒ Object
Returns the value of attribute line
4 5 6 |
# File 'lib/sixth_sense/source_location.rb', line 4 def line @line end |
#path ⇒ Object
Returns the value of attribute path
4 5 6 |
# File 'lib/sixth_sense/source_location.rb', line 4 def path @path end |
Instance Method Details
#to_h ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/sixth_sense/source_location.rb', line 5 def to_h { path: path, line: line, column: column } end |
#to_s ⇒ Object
13 14 15 16 17 |
# File 'lib/sixth_sense/source_location.rb', line 13 def to_s return path.to_s unless line [path, line, column].compact.join(":") end |