Class: ICU4X::FormattedPart
- Inherits:
-
Data
- Object
- Data
- ICU4X::FormattedPart
- Defined in:
- lib/icu4x.rb,
lib/icu4x.rb
Overview
Represents a part of a formatted string.
Used by format_to_parts methods in DateTimeFormat, NumberFormat, ListFormat, and RelativeTimeFormat.
Instance Attribute Summary collapse
-
#type ⇒ Symbol
readonly
The part type (e.g., :integer, :literal, :year).
-
#value ⇒ String
readonly
The formatted value.
Instance Method Summary collapse
-
#inspect ⇒ String
Human-readable representation.
Instance Attribute Details
#type ⇒ Symbol (readonly)
Returns The part type (e.g., :integer, :literal, :year).
68 69 70 |
# File 'lib/icu4x.rb', line 68 def type @type end |
#value ⇒ String (readonly)
Returns The formatted value.
68 69 70 |
# File 'lib/icu4x.rb', line 68 def value @value end |
Instance Method Details
#inspect ⇒ String
Returns Human-readable representation.
70 |
# File 'lib/icu4x.rb', line 70 def inspect = "#<ICU4X::FormattedPart type=#{type.inspect} value=#{value.inspect}>" |