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:

|>     class_extension do
|
|Maybe it could be called class_methods ?

I thought of the name first, but I changed my mind because it is too
similar to methods with different behavior e.g. private_methods.
Besides that class_extension can be used for something other than
methods, for example, constant definition.

|>   Foo.im
|
|Do you mean Foo.cm ?

Yes.  What a shame.

|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.

|It does seem a bit more convenient.

How is it more convenient?

							matz.