class Ollama::Utils::ColorizeTexts

def to_s

Returns:
  • (String) - The formatted string.
def to_s
  result = +''
  @texts.each_with_index do |t, i|
    color = colors[(t.hash ^ i.hash) % colors.size]
    wrap(t, percentage: 90).each_line { |l|
      result << on_color(color) { color(text_color(color)) { l } }
    }
    result << "\n##{bold{t.size.to_s}} \n\n"
  end
  result
end