Class: Finder
- Inherits:
-
Object
- Object
- Finder
- Defined in:
- lib/rbbt/ner/finder.rb
Defined Under Namespace
Modules: Match Classes: Instance
Instance Attribute Summary collapse
-
#instances ⇒ Object
Returns the value of attribute instances.
Instance Method Summary collapse
- #add_instance(path, open_options = {}) ⇒ Object
- #find(name) ⇒ Object
-
#initialize(path = nil, open_options = {}) ⇒ Finder
constructor
A new instance of Finder.
Constructor Details
Instance Attribute Details
#instances ⇒ Object
Returns the value of attribute instances.
44 45 46 |
# File 'lib/rbbt/ner/finder.rb', line 44 def instances @instances end |
Instance Method Details
#add_instance(path, open_options = {}) ⇒ Object
50 51 52 |
# File 'lib/rbbt/ner/finder.rb', line 50 def add_instance(path, = {}) @instances << Finder::Instance.new(path, ) end |
#find(name) ⇒ Object
54 55 56 57 58 |
# File 'lib/rbbt/ner/finder.rb', line 54 def find(name) @instances.inject([]) do |acc,instance| acc += instance.find(name) end end |