pesachzon
2/17/2006 8:07:00 PM
As far as I remember,
class_eval evaluates a block of code within the context of a class. So,
if you have a code which adds methods, they will be added to the class
and will be available to all instances of this class.
instance_eval is evaluated in the context of an object which is an
instance of some class. If you add methods they will be available only
to this object.
Cheers
Eugene Vahlis
Department of Computer Science
University of Toronto