Class: RecordDiff::Results::AddedResult

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

Overview

When a record has been added.

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

#changed?, #dropped?, #error?, #unchanged?

Constructor Details

#initialize(id:, after:, after_compare:) ⇒ AddedResult

Returns a new instance of AddedResult.



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

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

Instance Method Details

#added?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/record_diff/results/added_result.rb', line 13

def added?
  true
end