From: Ilias Lazaridis Date: 2005-04-07T19:54:40+09:00 Subject: Re: - E03b - The Ruby Object Model Trans wrote: > First it would appear that your repositioned diagram has an arrow > misdirected --the arrow from Class to (Object). A Class is an Object so > it should be the other way around. I was not carefull whilst simplifying the diagramm. possibly now I can understand: otherClass--->(OtherClass) | | | | v v Object--->(Object) ^ |^ | || | / | | / | | / | | / | Module--->(Module) ^ / ^ | / | || | |v | Class---->(Class) > Secondly, there are a number of ways to access metaclasses. Try, > > class Object > class << self > # (Object) > end > end > > Substitute Class, Module or OtherClass for Object. They all should > work. Other means: > > class Object > def Object.a_method > # this will be a method of metaclass > end > def self.another_method > # so will this > end > end > > Realize that a classes' metaclass is the same formalism as an object's > singleton class. I'm sorry. I cannot extract any essence. [I have reviewed all the other answer, too - but now I am even more confused now. will give it tomorrow another try] .. -- http://lazaridis.com