Sha256: 9627bf0747779f70bb69a65b92cf89fbe022463ab60cc5a2c07d78664619ff8d
Contents?: true
Size: 553 Bytes
Versions: 19
Compression:
Stored size: 553 Bytes
Contents
# encoding: UTF-8 # Copyright 2012 Twitter, Inc # http://www.apache.org/licenses/LICENSE-2.0 module TwitterCldr module Segmentation class Cursor attr_reader :text, :position, :match_cache def initialize(text) @text = text reset end def advance(amount = 1) @position += amount end def reset @position = 0 @match_cache = {} end def eof? position >= text.size end def eos? position >= text.size - 1 end end end end
Version data entries
19 entries across 19 versions & 2 rubygems