#START:add_product
class Cart

#END:add_product

  attr_reader :items
  attr_reader :total_price
  
  def initialize
    @items = []
    @total_price = 0.0
  end

#START:add_product
  def add_product(product)
    @items << LineItem.for_product(product)   # <wtf linkend="wtf.append">&lt;&lt;</wtf>
    @total_price += product.price
  end
end
#END:add_product

