class RatatuiRuby::Text::Line

A sequence of styled spans.

Words form sentences. Spans form lines.

This class composes multiple {Span} objects into a single horizontal row of text. It handles the layout of rich text fragments within the flow of a paragraph.

Use it to build multi-colored headers, status messages, or log entries.

Examples

Text::Line.new(
  spans: [
    Text::Span.styled("User: ", Style.new(modifiers: [:bold])),
    Text::Span.styled("kerrick", Style.new(fg: :blue))
  ]
)