From: Dave Hoefler Date: 2007-05-17T05:02:24+09:00 Subject: self.included question ------=_Part_29360_11248252.1179345744077 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi there, I see the following code chunk in a lot of Rails plugins: def self.included(base) base.extend(ClassMethods) end module ClassMethods def method_one end def method_two end end I'm most curious about "self.included". I checked out the docs on 'included' (http://www.ruby-doc.org/core/classes/Module.html#M001661). They pointed to 'Module.append_features' ( http://www.ruby-doc.org/core/classes/Module.html#M001659). Even after reading the docs, I'm still a little lost. Could someone break it down a little more than the docs? ...or point me at some other resource. I'd like to know "why" this is done. Thanks, Dave ------=_Part_29360_11248252.1179345744077--