Class: FuzzyStringMatch::JaroWinkler
- Inherits:
-
Object
- Object
- FuzzyStringMatch::JaroWinkler
- Defined in:
- lib/fuzzystringmatch.rb
Class Method Summary collapse
-
.create(type = :pure) ⇒ Object
factory method.
Instance Method Summary collapse
-
#create(type = :pure) ⇒ Object
this is obsolute.
Class Method Details
.create(type = :pure) ⇒ Object
factory method
30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/fuzzystringmatch.rb', line 30 def self.create( type = :pure ) # factory method case type when :pure FuzzyStringMatch::JaroWinklerPure.new when :native begin FuzzyStringMatch::JaroWinklerInline.new rescue NameError STDERR.puts "fuzzy-string-match Warning: native version is disabled. falled back to pure ruby version..." FuzzyStringMatch::JaroWinklerPure.new end end end |
Instance Method Details
#create(type = :pure) ⇒ Object
this is obsolute
43 44 45 46 |
# File 'lib/fuzzystringmatch.rb', line 43 def create( type = :pure ) # this is obsolute STDERR.puts "fuzzy-string-match Warning: FuzzyStringMatch.new.create() is obsolute, please use FuzzyStringMatch.create() ..." FuzzyStringMatch::JaroWinkler.create( type ) end |