From: "Jan-Erik R." Date: 2009-01-11T04:09:56+09:00 Subject: Re: What is meant by << operator ??? Muhammad mohsin ali Ma schrieb: > What is meant by << operator? > > For example this operator is used in following code, > > > /*****************************************************/ > def add_product(product) > current_item = @items.find {|item| item.product == product} > if current_item > current_item.increment_quantity > else > current_item = CartItem.new(product) > @items << current_item > end > current_item > end > /*****************************************************/ it appends the object "current_item" to the Array @items