From: Adam Prescott Date: 2011-04-18T21:10:57+09:00 Subject: Re: What do you do when you need to attach data to an object instance? --bcaec51d23dc9563e104a1304828 Content-Type: text/plain; charset=UTF-8 On Sat, Apr 16, 2011 at 6:53 PM, Kevin Mahler wrote: > >> and at best > >> confusing. module_eval can never be wrong or confusing. Not a hard > >> choice. > > > >I thought using module_eval was confusing in your code, and that was why > >I suggested class_eval(). > > A class is a module. I think the point is that classes and modules, while related in the way you've described, are still different. You don't instantiate or subclass modules, and you don't include classes. I too found module_eval less intuitive than class_eval, knowing that the receiver is a class, even knowing that a class "is a" module. --bcaec51d23dc9563e104a1304828--