Class: Ecoportal::API::Common::Content::DoubleModel::Diffable::DiffService

Inherits:
Object
  • Object
show all
Includes:
HashDiffPatch
Defined in:
lib/ecoportal/api/common/content/double_model/diffable/diff_service.rb

Constant Summary

Constants included from HashDiffPatch

HashDiffPatch::META_KEYS, HashDiffPatch::NO_CHANGES

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from HashDiffPatch::InstanceMethods

#patch_diff

Methods included from Ecoportal::API::Common::Content::DocHelpers

#array_id_index, #array_id_item, #array_ids, #get_body, #get_id

Constructor Details

#initialize(subject) ⇒ DiffService

Returns a new instance of DiffService.



7
8
9
# File 'lib/ecoportal/api/common/content/double_model/diffable/diff_service.rb', line 7

def initialize(subject)
  @subject = subject
end

Instance Attribute Details

#subjectObject (readonly)

Returns the value of attribute subject.



5
6
7
# File 'lib/ecoportal/api/common/content/double_model/diffable/diff_service.rb', line 5

def subject
  @subject
end

Instance Method Details

#path_diffObject



11
12
13
14
15
16
# File 'lib/ecoportal/api/common/content/double_model/diffable/diff_service.rb', line 11

def path_diff
  super(
    curr_doc,
    prev_doc
  )
end