Asciidoctor::Reader
Inherits Asciidoctor::Logging < Reference < Object
Methods for retrieving lines from AsciiDoc source files.
Constructors
Instance methods
dir
Sourcefile
Sourcelineno
Sourcepath
SourcePeek at the next line of source data. Processes the line if not already marked as processed, but does not consume it.
Peek at the next multiple lines of source data.
process_lines
Sourceread_lines_until(terminator : String | Nil = nil, break_on_blank_lines : Bool = false, break_on_list_continuation : Bool = false, skip_first_line : Bool = false, preserve_last_line : Bool = false, read_last_line : Bool = false, skip_line_comments : Bool = false, skip_processing : Bool = false, context : Symbol | Nil = nil, cursor_at : Cursor | Nil = nil, &block : String -> Bool) : Array(String)
Return all lines until a terminator, blank line, or block condition.
read_lines_until(terminator : String | Nil = nil, break_on_blank_lines : Bool = false, break_on_list_continuation : Bool = false, skip_first_line : Bool = false, preserve_last_line : Bool = false, read_last_line : Bool = false, skip_line_comments : Bool = false, skip_processing : Bool = false, context : Symbol | Nil = nil, cursor_at : Cursor | Nil = nil) : Array(String)
Overload without block.
skip_blank_lines
Skip blank lines at the cursor. Also skips LIST_CONTINUATION_PLACEHOLDER lines (treated as blank in Ruby AsciiDoctor).
source_lines
SourceAppends a short String representation of this object which includes its class name and its object address.
class Person
def initialize(@name : String, @age : Int32)
end
end
Person.new("John", 32).to_s # => #<Person:0x10a199f20>
Push a line onto the beginning of the Array of source data.
Push an Array of lines onto the front of the Array of source data.
unterminated
Source