Sha256: f34c261e52a8bd061b6f4236c4c4b2fce1107a0dff9c00ffe2ca4976792260ac
Contents?: true
Size: 327 Bytes
Versions: 10
Compression:
Stored size: 327 Bytes
Contents
# Encapsules the concept of a position inside a string. # class Parslet::Position attr_reader :bytepos include Comparable def initialize string, bytepos @string = string @bytepos = bytepos end def charpos @string.byteslice(0, @bytepos).size end def <=> b self.bytepos <=> b.bytepos end end
Version data entries
10 entries across 10 versions & 2 rubygems