James Edward Gray II wrote: > On Jun 14, 2006, at 1:48 AM, Yukihiro Matsumoto wrote: > > > Hi, > > > > In message "Re: Why the lack of mixing-in support for Class methods?" > > on Wed, 14 Jun 2006 15:34:43 +0900, "Phil Tomson" > > <rubyfan / gmail.com> writes: > > > > |Is this just a more automatic/nicer way to do: > > | > > |module Moo > > | def self.included mod > > | mod.extend ClassMethods > > | end > > | module ClassMethods > > | def cm > > | end > > | end > > | def im > > | end > > |end > > | > > |class Foo > > | include Moo > > |end > > | > > |? > > > > Maybe. I am not opposing to this style. > > I think I still prefer this approach, though the method thing is OK > with me too (as long as we don't call it class_methods()). If you allow #class_extension (or whatever you want to call it) to also take a list of modules in addition to the block, then you'd effectively have it both ways. Ex- module Moo module ClassMethods def cm end end class_extension ClassMethods end T.