class Asciidoctor::Reader::Cursor

Attributes

dir[R]
file[R]
lineno[R]
path[R]

Public Class Methods

new(file, dir = nil, path = nil, lineno = 1) click to toggle source
# File lib/asciidoctor/reader.rb, line 10
def initialize file, dir = nil, path = nil, lineno = 1
  @file, @dir, @path, @lineno = file, dir, path, lineno
end

Public Instance Methods

advance(num) click to toggle source
# File lib/asciidoctor/reader.rb, line 14
def advance num
  @lineno += num
end
line_info() click to toggle source
# File lib/asciidoctor/reader.rb, line 18
def line_info
  %(#{@path}: line #{@lineno})
end
Also aliased as: to_s
to_s()
Alias for: line_info