From: John Wilger Date: 2005-11-04T16:10:31+09:00 Subject: Re: invoking class method within class definition On 11/3/05, T.G. wrote: > class Foo > def self.bar > puts "class method called" > end > > def some_method > Foo.bar # -----> self.bar will not work here > end > end def some_method self.class.bar end will do what you want. Remember that inside #some_method, "self" refers to the instantiated object, not the class itself. -- Regards, John Wilger ----------- Alice came to a fork in the road. "Which road do I take?" she asked. "Where do you want to go?" responded the Cheshire cat. "I don't know," Alice answered. "Then," said the cat, "it doesn't matter." - Lewis Carrol, Alice in Wonderland