Sha256: f5e64fa9128714e5de00d77fcc46998df81e6ec6d28f1fb3a6a7ce81647763d3
Contents?: true
Size: 750 Bytes
Versions: 23
Compression:
Stored size: 750 Bytes
Contents
# encoding: UTF-8 # Copyright 2012 Twitter, Inc # http://www.apache.org/licenses/LICENSE-2.0 module TwitterCldr module Segmentation class LineIterator < SegmentIterator def each_boundary(str, &block) return to_enum(__method__, str) unless block_given? # Let the state machine find the first boundary for the line # boundary type (i.e. don't yield 0 here). This helps pass # nearly all the Unicode segmentation tests, so it must be # the right thing to do. Normally the first boundary is the # implicit start of text boundary, but potentially not for # the line rules? cursor = create_cursor(str) rule_set.each_boundary(cursor, &block) end end end end
Version data entries
23 entries across 23 versions & 1 rubygems