Class: Archsight::LineReference
- Inherits:
-
Object
- Object
- Archsight::LineReference
- Defined in:
- lib/archsight/database.rb
Overview
LineReference combines a path and line reference
Instance Attribute Summary collapse
-
#line_no ⇒ Object
Returns the value of attribute line_no.
-
#path ⇒ Object
Returns the value of attribute path.
Instance Method Summary collapse
- #at_line(line_no) ⇒ Object
-
#initialize(path, line_no) ⇒ LineReference
constructor
A new instance of LineReference.
- #to_s ⇒ Object
Constructor Details
#initialize(path, line_no) ⇒ LineReference
Returns a new instance of LineReference.
13 14 15 16 |
# File 'lib/archsight/database.rb', line 13 def initialize(path, line_no) @path = path @line_no = line_no end |
Instance Attribute Details
#line_no ⇒ Object
Returns the value of attribute line_no.
11 12 13 |
# File 'lib/archsight/database.rb', line 11 def line_no @line_no end |
#path ⇒ Object
Returns the value of attribute path.
11 12 13 |
# File 'lib/archsight/database.rb', line 11 def path @path end |
Instance Method Details
#at_line(line_no) ⇒ Object
22 23 24 |
# File 'lib/archsight/database.rb', line 22 def at_line(line_no) self.class.new(@path, line_no) end |
#to_s ⇒ Object
18 19 20 |
# File 'lib/archsight/database.rb', line 18 def to_s "#{@path}:#{@line_no}" end |