Method: DdeService::Matcher.find_differences

Defined in:
app/services/dde_client/matcher.rb

.find_differences(local_person, remote_person) ⇒ Object



10
11
12
13
14
15
# File 'app/services/dde_client/matcher.rb', line 10

def find_differences(local_person, remote_person)
  FIELDS_TO_MATCH
    .map { |field| [field, diff_field(field, local_person, remote_person)] }
    .reject { |_field, diff| diff.nil? }
    .each_with_object({}) { |sub_diff, diff| diff[sub_diff[0]] = sub_diff[1] }
end