class Lutaml::Model::ComparableModel::Tree

def to_s(indent = "", is_last = true)

def to_s(indent = "", is_last = true)
  prefix = is_last ? "└── " : "├── "
  result = "#{indent}#{colorize(prefix + @content, @color)}\n"
  @children.each_with_index do |child, index|
    is_last_child = index == @children.size - 1
    child_indent = indent + (if is_last
                               "    "
                             else
                               "#{colorize('│',
                                           @color)}   "
                             end)
    result += child.to_s(child_indent, is_last_child)
  end
  result
end