Hi,

nobu.nokada / softhome.net <nobu.nokada / softhome.net> writes:

:> Thus "class<<self;self;end" tells the singleton class to return itself.
:
:That's right, thank you.
:
:And a singleton method of the object is defined in the
:singleton class context by class_eval.

"class<<self;self;end" is equivalent to "self.type".
And "self.type" is equivalent to "type".

class Cl
  def initialize(name)
    type.class_eval {attr_accessor, name}
  end
end

-- 
eban