class Lutaml::Model::ComparableModel::DiffContext

def format_single_value(value, parent_node, label, color = nil)

Returns:
  • (String) - Formatted single value

Parameters:
  • label (String) -- The label for the value
  • is_last (Boolean) -- Whether this is the last item in the current level
  • value (Object) -- The value to format
def format_single_value(value, parent_node, label, color = nil)
  node = Tree.new("#{label}#{label.empty? ? '' : ':'}", color: color)
  parent_node.add_child(node)
  case value
  when ComparableModel
    format_comparable_mapper(value, node, color)
  when Array
    if value.empty?
      node.add_child(Tree.new("(nil)", color: color))
    else
      format_collection(value, value, node)
    end
  else
    node.content += " #{format_value(value)}"
  end
end