Skip to content

Commit

Permalink
Cart モデルクラス追加
Browse files Browse the repository at this point in the history
  • Loading branch information
kyanny committed Jan 20, 2010
1 parent aa93f61 commit 414166a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions depot/app/models/cart.rb
@@ -0,0 +1,11 @@
class Cart
attr_reader :items

def initialize
@items = []
end

def add_product (product)
@items << product
end
end

0 comments on commit 414166a

Please sign in to comment.