lib/fuzzy_match/similarity.rb in fuzzy_match-1.2.2 vs lib/fuzzy_match/similarity.rb in fuzzy_match-1.3.0

- old
+ new

@@ -21,11 +21,11 @@ def original_weight @original_weight ||= (1.0 / (wrapper1.render.length * wrapper2.render.length)) end def best_score - @best_score ||= Score.new best_wrapper1_variant, best_wrapper2_variant + @best_score ||= FuzzyMatch.score_class.new best_wrapper1_variant, best_wrapper2_variant end def best_wrapper1_variant best_variants[0] end @@ -37,11 +37,11 @@ def best_variants @best_variants ||= wrapper1.variants.product(wrapper2.variants).sort do |tuple1, tuple2| wrapper1_variant1, wrapper2_variant1 = tuple1 wrapper1_variant2, wrapper2_variant2 = tuple2 - score1 = Score.new wrapper1_variant1, wrapper2_variant1 - score2 = Score.new wrapper1_variant2, wrapper2_variant2 + score1 = FuzzyMatch.score_class.new wrapper1_variant1, wrapper2_variant1 + score2 = FuzzyMatch.score_class.new wrapper1_variant2, wrapper2_variant2 score1 <=> score2 end[-1] end