Class: Seafoam::Annotator

Inherits:
Object
  • Object
show all
Defined in:
lib/seafoam/annotators.rb

Overview

The base class for all annotators. You must subclass this to be recognized as an annotator.

Constant Summary collapse

SUBCLASSES =
[]

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Annotator

Returns a new instance of Annotator.



38
39
40
# File 'lib/seafoam/annotators.rb', line 38

def initialize(options = {})
  @options = options
end

Class Method Details

.inherited(annotator) ⇒ Object



50
51
52
# File 'lib/seafoam/annotators.rb', line 50

def self.inherited(annotator)
  SUBCLASSES.push annotator
end

Instance Method Details

#annotate(_graph) ⇒ Object

Raises:

  • (NotImplementedError)


46
47
48
# File 'lib/seafoam/annotators.rb', line 46

def annotate(_graph)
  raise NotImplementedError
end

#applies?(_graph) ⇒ Boolean

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


42
43
44
# File 'lib/seafoam/annotators.rb', line 42

def applies?(_graph)
  raise NotImplementedError
end