class Sorbet::Eraser::Parser::SingleByteString

Represents a line in the source. If this class is being used, it means that every character in the string is 1 byte in length, so we can just return the start of the line + the index.

Public Class Methods

new(start) click to toggle source
# File lib/sorbet/eraser/parser.rb, line 13
def initialize(start)
  @start = start
end

Public Instance Methods

[](byteindex) click to toggle source
# File lib/sorbet/eraser/parser.rb, line 17
def [](byteindex)
  @start + byteindex
end