Class: RecordDiff::Results::ChangedResult

Inherits:
AbstractResult show all
Defined in:
lib/record_diff/results/changed_result.rb

Overview

If the ID can be matched, but the two records have changed.

Instance Attribute Summary

Attributes inherited from AbstractResult

#after_compare, #after_original, #before_compare, #before_original, #before_transform, #id, #record_diff

Instance Method Summary collapse

Methods inherited from AbstractResult

#added?, #dropped?, #error?, #unchanged?

Constructor Details

#initialize(id:, after:, before:, after_compare:, before_compare:) ⇒ ChangedResult

Returns a new instance of ChangedResult.



7
8
9
10
11
12
13
# File 'lib/record_diff/results/changed_result.rb', line 7

def initialize(id:, after:, before:, after_compare:, before_compare:)
  @id = id
  @after_original = after
  @after_compare = after_compare
  @before_original = before
  @before_compare = before_compare
end

Instance Method Details

#changed?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/record_diff/results/changed_result.rb', line 15

def changed?
  true
end