Sha256: 31cfd44f5862fc90cb968c8b04c61bb87fc62081a08b0d6a0ec96c2bd1a82b81
Contents?: true
Size: 386 Bytes
Versions: 8
Compression:
Stored size: 386 Bytes
Contents
module Kosher class Condition < Struct.new(:in_words) def to_i case in_words when 'new' then 1 when 'mint' then 2 when 'verygood' then 3 when 'good' then 4 when 'acceptable' then 5 else 6 end end def kosher? to_i <= 4 end def new? in_words == 'new' end def used? !new? end end end
Version data entries
8 entries across 8 versions & 1 rubygems