Module: TextDetector::Dictionary

Defined in:
lib/text_detector/dictionary.rb,
lib/text_detector/dictionary/base.rb,
lib/text_detector/dictionary/file.rb

Defined Under Namespace

Classes: Base, File

Class Method Summary collapse

Class Method Details

.factory(dictionary) ⇒ Object



6
7
8
9
10
11
# File 'lib/text_detector/dictionary.rb', line 6

def self.factory(dictionary)
  case dictionary
  when ::IO, ::StringIO
    TextDetector::Dictionary::File.new(dictionary)
  end
end