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

Version Path
twitter_cldr-6.11.5 lib/twitter_cldr/segmentation/line_iterator.rb
twitter_cldr-6.11.4 lib/twitter_cldr/segmentation/line_iterator.rb
twitter_cldr-6.11.3 lib/twitter_cldr/segmentation/line_iterator.rb
twitter_cldr-6.11.2 lib/twitter_cldr/segmentation/line_iterator.rb
twitter_cldr-6.11.1 lib/twitter_cldr/segmentation/line_iterator.rb
twitter_cldr-6.11.0 lib/twitter_cldr/segmentation/line_iterator.rb
twitter_cldr-6.10.0 lib/twitter_cldr/segmentation/line_iterator.rb
twitter_cldr-6.9.0 lib/twitter_cldr/segmentation/line_iterator.rb
twitter_cldr-6.8.0 lib/twitter_cldr/segmentation/line_iterator.rb
twitter_cldr-6.7.0 lib/twitter_cldr/segmentation/line_iterator.rb
twitter_cldr-6.6.2 lib/twitter_cldr/segmentation/line_iterator.rb
twitter_cldr-6.6.1 lib/twitter_cldr/segmentation/line_iterator.rb
twitter_cldr-6.6.0 lib/twitter_cldr/segmentation/line_iterator.rb
twitter_cldr-6.5.0 lib/twitter_cldr/segmentation/line_iterator.rb
twitter_cldr-6.4.0 lib/twitter_cldr/segmentation/line_iterator.rb
twitter_cldr-6.3.0 lib/twitter_cldr/segmentation/line_iterator.rb
twitter_cldr-6.2.0 lib/twitter_cldr/segmentation/line_iterator.rb
twitter_cldr-6.1.0 lib/twitter_cldr/segmentation/line_iterator.rb
twitter_cldr-6.0.2 lib/twitter_cldr/segmentation/line_iterator.rb
twitter_cldr-6.0.1 lib/twitter_cldr/segmentation/line_iterator.rb