On Sun, May 13, 2001 at 01:31:16AM +0900, Eric Bennett wrote:
> > 		class << self
...
> No different than saying  def Date.once(*ids)  but arguably more
> convienient if you have a bunch of class methods to add.

Doh!

> At the time you are calling @level=, self is the module not an
> instance.  Try changing this to:
> 
> module Child
> 	attr :level, true
> 	def initialize
> 		super
> 		@level = 0
> 	end
> end

But this doesn't work in the following case:

module A ; def initialize ; puts "A" ; end ; end
class B ; def initialize ; puts "B" ; end ; end
class C < B ; include A ; def initialize ; puts "C" ; end ; end

c=C.new

results in:

A
C

The problem is that initialization is a special case.  I believe that 
It is important that a class (or module) have the opportunity to set 
itself up correctly.

Thanks for the reply!

--- SER