class Lutaml::Model::ComparableModel::DiffContext
def calculate_attribute_score(value1, value2)
-
(Float)
- The diff score for the attribute
Parameters:
-
value2
(Object
) -- The value of the attribute in the second object -
value1
(Object
) -- The value of the attribute in the first object
def calculate_attribute_score(value1, value2) if value1 == value2 0 elsif value1.is_a?(Array) && value2.is_a?(Array) calculate_array_score(value1, value2) else value1.instance_of?(value2.class) ? 0.5 : 1 end end