From: "David A. Black" Date: 2008-04-10T06:17:04+09:00 Subject: Re: Question of self Hi -- On Thu, 10 Apr 2008, Daniel Waite wrote: > module FunFunModule > > def self.included(base) > base.extend ClassMethods > > class << base # <- Is this the instance of ActiveRecord? > ... > end > end > > module ClassMethods > ... > end > > end > > The above code is included into ActiveRecord via... > > ActiveRecord::Base.send :include, FunFunModule > > Is the class << base on line 6 the actual instance of the AR model? No; it's the singleton class of AR::Base. David -- Rails training from David A. Black and Ruby Power and Light: ADVANCING WITH RAILS April 14-17 New York City INTRO TO RAILS June 9-12 Berlin ADVANCING WITH RAILS June 16-19 Berlin See http://www.rubypal.com for details and updates!