Class: TextDetector::Detector::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/text_detector/detector/base.rb

Direct Known Subclasses

Regexp, Simple

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dictionary) ⇒ Base

Returns a new instance of Base.



6
7
8
9
# File 'lib/text_detector/detector/base.rb', line 6

def initialize(dictionary)
  @dictionary = dictionary
  setup
end

Instance Attribute Details

#dictionaryObject (readonly)

Returns the value of attribute dictionary.



4
5
6
# File 'lib/text_detector/detector/base.rb', line 4

def dictionary
  @dictionary
end

Instance Method Details

#detect(text) ⇒ Object

Raises:

  • (NotImplementedError)


11
12
13
# File 'lib/text_detector/detector/base.rb', line 11

def detect(text)
  raise NotImplementedError
end

#detect_all(text) ⇒ Object

Raises:

  • (NotImplementedError)


15
16
17
# File 'lib/text_detector/detector/base.rb', line 15

def detect_all(text)
  raise NotImplementedError
end