Sha256: 9715ece6e9bd8afa4e8876a699aea383b978d1a587187d00578b942a8882cd4f
Contents?: true
Size: 424 Bytes
Versions: 6
Compression:
Stored size: 424 Bytes
Contents
require 'amatch' class LooseTightDictionary class Score attr_reader :str1, :str2 def initialize(str1, str2) @str1 = str1 @str2 = str2 end def to_f @to_f ||= str1.pair_distance_similar str2 end def inspect %{#<Score: to_f=#{to_f}>} end def <=>(other) to_f <=> other.to_f end def ==(other) to_f == other.to_f end end end
Version data entries
6 entries across 6 versions & 1 rubygems