Closed kristindiannefoss closed 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
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