Crst::LineReader
Inherits Reference < Object
Helper class for iterating over lines of text
Constructors
new(lines : Array(String))
SourceInstance methods
consume_until
Consume lines until the block returns true (or EOF) The line that satisfies the condition is NOT consumed Returns the consumed lines
index
Sourcelines
Sourcepeek(offset : Int32 = 1) : String | Nil
Returns the line at offset from current position peek(1) is the next line
slice(start_index : Int32) : Array(String)
Returns a slice of lines from start (inclusive) to current (exclusive)