Class: Bibtex::SourcePos
- Inherits:
-
Object
- Object
- Bibtex::SourcePos
- Defined in:
- lib/bibtex/lexer.rb
Instance Attribute Summary collapse
-
#column ⇒ Object
readonly
Returns the value of attribute column.
-
#file ⇒ Object
readonly
Returns the value of attribute file.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
Instance Method Summary collapse
-
#initialize(line, column, file) ⇒ SourcePos
constructor
A new instance of SourcePos.
- #to_s ⇒ Object
Constructor Details
#initialize(line, column, file) ⇒ SourcePos
Returns a new instance of SourcePos.
7 8 9 10 11 |
# File 'lib/bibtex/lexer.rb', line 7 def initialize(line, column, file) @line = line @column = column @file = file end |
Instance Attribute Details
#column ⇒ Object (readonly)
Returns the value of attribute column.
5 6 7 |
# File 'lib/bibtex/lexer.rb', line 5 def column @column end |
#file ⇒ Object (readonly)
Returns the value of attribute file.
5 6 7 |
# File 'lib/bibtex/lexer.rb', line 5 def file @file end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
5 6 7 |
# File 'lib/bibtex/lexer.rb', line 5 def line @line end |
Instance Method Details
#to_s ⇒ Object
13 14 15 |
# File 'lib/bibtex/lexer.rb', line 13 def to_s "#{file}:#{line}" end |