Module: Fuzzzy::Index

Defined in:
lib/fuzzzy/index.rb

Instance Method Summary collapse

Instance Method Details

#_indexer(method) ⇒ Object



3
4
5
6
# File 'lib/fuzzzy/index.rb', line 3

def _indexer method
  @indexer ||= {}
  @indexer[method] ||= class_for(:indexer, method).new
end

#_searcher(method) ⇒ Object



8
9
10
11
# File 'lib/fuzzzy/index.rb', line 8

def _searcher method
  @searcher ||= {}
  @searcher[method] ||= class_for(:searcher, method).new
end

#class_for(type, method) ⇒ Object



13
14
15
# File 'lib/fuzzzy/index.rb', line 13

def class_for type, method
  "fuzzzy/#{method}/#{type}".classify.constantize
end