kristindiannefoss / little_shop

1 stars 0 forks source link

cart item refactor #73

Closed kristindiannefoss closed 8 years ago

kristindiannefoss commented 8 years ago

CartItem < SimpleDelegator

Def initialize(id, qnty) @item = Item.find(id) @quantity = qnty super(@item) *double check this syntax end

so you can do: item = CartItem.new(id, quantity) item.name item.quantity