Sha256: 9c666aa9b13b24b46a994e182618ec8ad325896316b81cb55f65339a89e23ecb
Contents?: true
Size: 774 Bytes
Versions: 38
Compression:
Stored size: 774 Bytes
Contents
module Picky module API module Tokenizer def extract_tokenizer thing return unless thing if thing.respond_to? :tokenize thing else if thing.respond_to? :[] Picky::Tokenizer.new thing else if respond_to? :name location = ' for ' if @index location += "#{@index.name}:#{name}" else location += "#{name}" end else location = '' end raise <<-ERROR indexing options#{location} should be either * a Hash or * an object that responds to #tokenize(text) => [[token1, ...], [original1, ...]] ERROR end end end end end end
Version data entries
38 entries across 38 versions & 1 rubygems