Sha256: 83bd0a37e5417e051c8ba1c5d33c080b7b316f33a39d89f0f4d9a52801beee6e
Contents?: true
Size: 675 Bytes
Versions: 48
Compression:
Stored size: 675 Bytes
Contents
module Picky module Generators module Similarity extend Helpers::Identification def self.from thing, index_name = nil, category_name = nil return Default unless thing if thing.respond_to?(:encode) && thing.respond_to?(:prioritize) thing else raise <<-ERROR similarity options #{identifier_for(index_name, category_name)}should be either * for example a Similarity::Phonetic.new(n), Similarity::Metaphone.new(n), Similarity::DoubleMetaphone.new(n) etc. or * an object that responds to #encode(text) => encoded_text and #prioritize(array_of_encoded, encoded) ERROR end end end end end
Version data entries
48 entries across 48 versions & 1 rubygems