From: Ilan Berci Date: 2007-11-16T02:02:13+09:00 Subject: Re: Module vs Class jack.tang wrote: > Hi Guys > > I am new to ruby, and one question here: what object should I wrap as > Module and what should I wrap as Class, any rules to fellow? > > Thanks > /Jack Classes are extended from Modules with the added "functionality" that they can create instances of themselves(objects). I hope this makes it more conceptually clear for you in terms of "wrap"ing.. If you want to associate a group of methods into a name space, then a module will suffice. If on the other hand, you want to create functionality where the methods mostly act upon contained state(instance variables), then a class will suit your needs better. ilan -- Posted via http://www.ruby-forum.com/.