projects
/
depot.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Added date_available_from to products, updated conditions in product.find_products_fo...
[depot.git]
/
app
/
models
/
cart_item.rb
1
class
CartItem
2
attr_reader
:product
,
:quantity
3
4
def
initialize
(
product
)
5
@product
=
product
6
@quantity
=
1
7
end
8
9
def
increment_quantity
10
@quantity
+=
1
11
end
12
13
def
title
14
@product
.
title
15
end
16
17
def
price
18
@product
.
price
*
@quantity
19
end
20
21
end