Sha256: 5fbd8b931c28806ed2d0a43bb38b7dfa03b5a086ebb138ea0e3a706ea707fc3a

Contents?: true

Size: 228 Bytes

Versions: 5

Compression:

Stored size: 228 Bytes

Contents

module Kosher
  class Condition < Struct.new(:grade)
    include Threshold

    THRESHOLD = 4

    def kosher?
      grade <= threshold
    end

    def new?
      grade == 1
    end

    def used?
      !new?
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
kosher-0.2.16 lib/kosher/condition.rb
kosher-0.2.15 lib/kosher/condition.rb
kosher-0.2.14 lib/kosher/condition.rb
kosher-0.2.13 lib/kosher/condition.rb
kosher-0.2.12 lib/kosher/condition.rb