Class: TextDetector::Dictionary::File

Inherits:
Base
  • Object
show all
Defined in:
lib/text_detector/dictionary/file.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from TextDetector::Dictionary::Base

Instance Attribute Details

#depthObject (readonly)

Returns the value of attribute depth.



7
8
9
# File 'lib/text_detector/dictionary/file.rb', line 7

def depth
  @depth
end

Instance Method Details

#lookup(member) ⇒ Object



9
10
11
# File 'lib/text_detector/dictionary/file.rb', line 9

def lookup(member)
  @dictionary.include? member
end

#membersObject



13
14
15
# File 'lib/text_detector/dictionary/file.rb', line 13

def members
  @dictionary.to_a
end