Class: CaTissue::Annotation::RecordEntryIntegrator

Inherits:
Object
  • Object
show all
Defined in:
lib/catissue/database/annotation/record_entry_integrator.rb

Overview

A RecordEntryIntegrator uses the post-1.1.2 mechanism to save caTissue hook-annotation associations.

Instance Method Summary collapse

Constructor Details

#initialize(mod) ⇒ RecordEntryIntegrator

Returns a new instance of RecordEntryIntegrator.

Parameters:

  • mod (AnnotationModule)

    the annotation module



8
9
10
11
# File 'lib/catissue/database/annotation/record_entry_integrator.rb', line 8

def initialize(mod)
  @mod = mod
  @ann_ctxt_hash = {}
end

Instance Method Details

#associate(hook, annotation) ⇒ Object

Associates the given hook domain object to the annotation.

Parameters:



25
26
27
28
# File 'lib/catissue/database/annotation/record_entry_integrator.rb', line 25

def associate(hook, annotation)
  rec_entry = create_record_entry(hook, annotation)
  annotation.proxy.identifier = rec_entry.getId
end