Class: CaTissue::Annotator
- Inherits:
-
Object
- Object
- CaTissue::Annotator
- Defined in:
- lib/catissue/database/annotation/annotator.rb
Overview
An Annotator creates annotation services for annotatable and annotation classes.
Instance Attribute Summary collapse
-
#integration_service ⇒ Object
readonly
Returns the value of attribute integration_service.
Instance Method Summary collapse
-
#create_annotation_service(name) ⇒ Annotation::AnnotationService
The annotation service.
-
#initialize(database) ⇒ Annotator
constructor
Initializes a new Annotator for the given database.
Constructor Details
#initialize(database) ⇒ Annotator
Initializes a new Annotator for the given database.
13 14 15 16 17 |
# File 'lib/catissue/database/annotation/annotator.rb', line 13 def initialize(database) @database = database #the sole DE integration service, used by the annotation services @integration_service = Annotation::IntegrationService.new end |
Instance Attribute Details
#integration_service ⇒ Object (readonly)
Returns the value of attribute integration_service.
8 9 10 |
# File 'lib/catissue/database/annotation/annotator.rb', line 8 def integration_service @integration_service end |
Instance Method Details
#create_annotation_service(name) ⇒ Annotation::AnnotationService
Returns the annotation service.
21 22 23 |
# File 'lib/catissue/database/annotation/annotator.rb', line 21 def create_annotation_service(name) Annotation::AnnotationService.new(@database, name, :integration_service => @integration_service) end |