Florian Groa ñÄrit :
> why the lucky stiff wrote:
> 
>> The `class_def' method is intended to be used to add instance methods 
>> (like the `initialize' I'm adding in Dwemthy's Array):
>>
>>  class Dragon; end
>>  Dragon.class_def :initialize do
>>     @life = 11; @strength = 12
>>  end
> 
> 
> Oh, that's already done by Module#define_method then. Perhaps you can 
> just make that method public?
> 
> 
> 

  def class_def name, &blk
   class_eval { self.define_method name, &blk }
  end

It was the other solution I thought for.

-- 
Lionel Thiry

Personal website: http://users.skynet.be/lthiry/