Sent from my tablet

On 2013-09-03, at 10:50 PM, Nikodem Solarz <lists / ruby-forum.com> wrote:

> You forgot end :)
> class Cart
> 
>        attr_reader :items
> 
>        def initialize
> 
>                @items = Array.new
> 
>        end
> 
>        def add_item(item)
> 
>                @item.push item
> 
>        end
> 
>        def remove_item
> 
>                @item.pop
> 
>        end
> end
> 
> Try it now :)

Should add_item and remove_item refer to @items rather than @item ?

Mike

> 
> -- 
> Posted via http://www.ruby-forum.com/.