Sha256: 5404f3f811ba6b049b59dc31b274d387c09a6eed4cdc372a327e8dc78a23332a

Contents?: true

Size: 337 Bytes

Versions: 2

Compression:

Stored size: 337 Bytes

Contents

module Kosher

  # The actual item offered by a seller.
  #
  # An item has a price, quantity, condition, and description.
  class Item < Structure
    key     :quantity, :type => Integer
    has_one :price
    has_one :condition
    has_one :description

    def kosher?
      condition.kosher? && description.kosher?
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
kosher-0.8.0 lib/kosher/item.rb
kosher-0.7.0 lib/kosher/item.rb