On Wed, Dec 24, 2008 at 1:32 AM, Matt Wynne <m...@mattwynne.net> wrote:
> Is that some kind of trick to create multiple >> inheritance? >> > > Not really in that particular case. Ruby modules generally allow you to do > multiple inheritance by 'mixing in' behaviour to classes, but that would be > when you use 'include' to bring the methods defined in the module into the > class itself. When you inherit from a class, you inherit both its instance methods and its class methods. When you include a module, you (usually) just inherit its instance methods. The trick under discussion just makes sure you inherit the modules "class methods" as well, making it as if you inherited normally. Is there any way without digging thru source to know which > class include methods from other classes or do y'all just get so cozy > with every Rails class you use that you "just know?" > ancestors tells you a class's superclasses (including modules). ///ark
_______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users