Class: Chawan::Analyzers::AbstractAnalyzer

Inherits:
Object
  • Object
show all
Defined in:
lib/chawan/analyzers/abstract_analyzer.rb

Direct Known Subclasses

ChasenAnalyzer

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ AbstractAnalyzer

Returns a new instance of AbstractAnalyzer.


6
7
8
# File 'lib/chawan/analyzers/abstract_analyzer.rb', line 6

def initialize(options = {})
  @options = options.dup.freeze
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options


4
5
6
# File 'lib/chawan/analyzers/abstract_analyzer.rb', line 4

def options
  @options
end

Instance Method Details

#parse(text) ⇒ Object

Raises:

  • (NotImplementedError)

10
11
12
# File 'lib/chawan/analyzers/abstract_analyzer.rb', line 10

def parse(text)
  raise NotImplementedError, "#{self.class}#parse should be implemented"
end