From: John Feminella Date: 2011-02-16T04:50:05+09:00 Subject: Re: What does << do? The answer is, "it depends on what @rooms is". In Ruby, (almost) everything's an object, so when you write "@rooms << ...", you're actually invoking the "<<" method on "@rooms". If @rooms is an Array, for example, then << will append to the end of the array, which is probably what's happening here. ~ jf -- John Feminella Principal Consultant, BitsBuilder LI: http://www.linkedin.com/in/johnxf SO: http://stackoverflow.com/users/75170/ On Tue, Feb 15, 2011 at 14:25, Gaba Luschi wrote: > Reading a sample program that says: > @rooms << Room.new(reference, name, description, connections) > > What does the "<<" part do?  Thanks! > > -- > Posted via http://www.ruby-forum.com/. > >