Class: TaskJuggler::TextParser::SourceFileInfo
- Defined in:
- lib/taskjuggler/TextParser/SourceFileInfo.rb
Overview
Simple class that holds the info about a source file reference.
Instance Attribute Summary collapse
-
#columnNo ⇒ Object
readonly
Returns the value of attribute columnNo.
-
#fileName ⇒ Object
readonly
Returns the value of attribute fileName.
-
#lineNo ⇒ Object
readonly
Returns the value of attribute lineNo.
Instance Method Summary collapse
-
#initialize(file, line, col) ⇒ SourceFileInfo
constructor
Create a new SourceFileInfo object.
-
#to_s ⇒ Object
Return the info in the common “filename:line:” format.
Constructor Details
#initialize(file, line, col) ⇒ SourceFileInfo
Create a new SourceFileInfo object. file is the name of the file. line is the line in this file, col is the column number in the line.
26 27 28 29 30 |
# File 'lib/taskjuggler/TextParser/SourceFileInfo.rb', line 26 def initialize(file, line, col) @fileName = file @lineNo = line @columnNo = col end |
Instance Attribute Details
#columnNo ⇒ Object (readonly)
Returns the value of attribute columnNo.
21 22 23 |
# File 'lib/taskjuggler/TextParser/SourceFileInfo.rb', line 21 def columnNo @columnNo end |
#fileName ⇒ Object (readonly)
Returns the value of attribute fileName.
21 22 23 |
# File 'lib/taskjuggler/TextParser/SourceFileInfo.rb', line 21 def fileName @fileName end |
#lineNo ⇒ Object (readonly)
Returns the value of attribute lineNo.
21 22 23 |
# File 'lib/taskjuggler/TextParser/SourceFileInfo.rb', line 21 def lineNo @lineNo end |
Instance Method Details
#to_s ⇒ Object
Return the info in the common “filename:line:” format.
33 34 35 36 |
# File 'lib/taskjuggler/TextParser/SourceFileInfo.rb', line 33 def to_s # The column is not reported for now. "#{@fileName}:#{@lineNo}:" end |