Class: Fuzzzy::Soundex::Base

Inherits:
MethodBase show all
Defined in:
lib/fuzzzy/methods/soundex/base.rb

Direct Known Subclasses

Indexer, Searcher

Constant Summary

Constants included from Redis

Redis::INDEX_KEY

Instance Attribute Summary

Attributes inherited from MethodBase

#context

Instance Method Summary collapse

Methods inherited from MethodBase

#index_name, #prepare_string, #stopwords, #with_context

Methods included from Redis

counter_key, #counter_key, #dictionary_key, #redis, #shared_key

Instance Method Details

#index_typeObject



8
9
10
# File 'lib/fuzzzy/methods/soundex/base.rb', line 8

def index_type
  'soundex_i'
end

#soundex(string = nil) ⇒ Object



4
5
6
# File 'lib/fuzzzy/methods/soundex/base.rb', line 4

def soundex string=nil
  context[:soundex] ||= Text::Soundex.soundex(string || query_index_string).to_s
end