8 def add_product(product
)
9 current_item
= @items.find
{|item
| item
.product
== product
}
11 current_item
.increment_quantity
13 current_item
= CartItem
.new(product
)
14 @items << current_item
20 @items.sum
{|item
| item
.price
}
24 @items.sum
{|item
| item
.quantity
}