Class: PaperTrail::RelatedChanges::Serializer::BuildDiffs
- Inherits:
-
Object
- Object
- PaperTrail::RelatedChanges::Serializer::BuildDiffs
- Defined in:
- lib/paper_trail/related_changes/serializer.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(attr, diff, record, request_type, change) ⇒ BuildDiffs
constructor
A new instance of BuildDiffs.
Constructor Details
#initialize(attr, diff, record, request_type, change) ⇒ BuildDiffs
Returns a new instance of BuildDiffs.
72 73 74 75 76 77 78 |
# File 'lib/paper_trail/related_changes/serializer.rb', line 72 def initialize(attr, diff, record, request_type, change) @attr = attr.to_sym @diff = diff @record = record @request_type = request_type @change = change end |
Instance Method Details
#call ⇒ Object
80 81 82 83 84 |
# File 'lib/paper_trail/related_changes/serializer.rb', line 80 def call return call_serializer if custom_serializer change.diffs << default_diff end |