class NestedText::InlineScanner
Attributes
line[R]
pos[R]
Public Class Methods
new(line)
click to toggle source
# File lib/nestedtext/scanners.rb, line 48 def initialize(line) @line = line @pos = 0 end
Public Instance Methods
empty?()
click to toggle source
# File lib/nestedtext/scanners.rb, line 53 def empty? @pos >= @line.content.length end
peek()
click to toggle source
# File lib/nestedtext/scanners.rb, line 68 def peek empty? ? nil : @line.content[@pos] end
read_next()
click to toggle source
# File lib/nestedtext/scanners.rb, line 61 def read_next raise Errors::AssertionInlineScannerIsEmptyError if empty? @pos += 1 @line.content[@pos - 1] end
remaining()
click to toggle source
# File lib/nestedtext/scanners.rb, line 57 def remaining @line.content[@pos..] end