Class: Bibtex::SourcePos

Inherits:
Object
  • Object
show all
Defined in:
lib/bibtex/lexer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#columnObject (readonly)

Returns the value of attribute column.



5
6
7
# File 'lib/bibtex/lexer.rb', line 5

def column
  @column
end

#fileObject (readonly)

Returns the value of attribute file.



5
6
7
# File 'lib/bibtex/lexer.rb', line 5

def file
  @file
end

#lineObject (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_sObject



13
14
15
# File 'lib/bibtex/lexer.rb', line 13

def to_s
  "#{file}:#{line}"
end