class Lutaml::Model::ComparableModel::DiffContext
def format_diff_item(item, color, parent_node)
-
(String)
- Formatted output for the diff item
Parameters:
-
prefix
(String
) -- The prefix to use for the item (+ or -) -
color
(Symbol
) -- The color to use for the item -
index
(Integer
) -- The index of the item -
is_last
(Boolean
) -- Whether this is the last item in the current level -
item
(Object
) -- The item to format
def format_diff_item(item, color, parent_node) if item.is_a?(ComparableModel) return format_comparable_mapper(item, parent_node, color) end parent_node.add_child(Tree.new(format_value(item), color: color)) end