Sha256: 322f2c3a824d0a809e74de9342d61312179813bac08a53beea003186c966f699
Contents?: true
Size: 454 Bytes
Versions: 7
Compression:
Stored size: 454 Bytes
Contents
module Kosher class Seller < Struct.new(:id, :name, :rating, :location) def blacklist @blacklist ||= [] end def blacklist=(ids) @blacklist = ids end def blacklisted? blacklist.include? id end def kosher? !blacklisted? && (rating.to_f == 0.0 || rating >= threshold) end def threshold @threshold ||= 4.8 end def threshold=(rating) @threshold = rating end end end
Version data entries
7 entries across 7 versions & 1 rubygems