Sha256: e09ea140349fbfb399feef1b2f91d01217b05d954e2bb0a6753c4709b3799384
Contents?: true
Size: 569 Bytes
Versions: 28
Compression:
Stored size: 569 Bytes
Contents
module Picky module API module Category module Weight def extract_weight thing return Generators::Weights::Default unless thing if thing.respond_to? :weight_for thing else raise <<-ERROR weight options for #{index_name}:#{name} should be either * for example a Weights::Logarithmic.new, Weights::Constant.new(int = 0), Weights::Dynamic.new(&block) etc. or * an object that responds to #weight_for(amount_of_ids_for_token) => float ERROR end end end end end end
Version data entries
28 entries across 28 versions & 1 rubygems