Class: ICU4X::Segmenter::Segment

Inherits:
Data
  • Object
show all
Defined in:
lib/icu4x.rb,
lib/icu4x.rb,
lib/icu4x/yard_docs.rb

Overview

Represents a segment of text.

Instance Attribute Summary collapse

Instance Attribute Details

#indexInteger (readonly)

Returns the byte index of this segment in the original string.

Returns:

  • (Integer)

    the byte index of this segment in the original string



82
83
84
# File 'lib/icu4x.rb', line 82

def index
  @index
end

#segmentString (readonly)

Returns the segment text.

Returns:

  • (String)

    the segment text



82
83
84
# File 'lib/icu4x.rb', line 82

def segment
  @segment
end