From: James Edward Gray II Date: 2006-08-30T03:52:06+09:00 Subject: Re: Singleton classes and methods (was Re: Reformat Ruby source code in vim?) On Aug 29, 2006, at 11:09 AM, dblack@wobblini.net wrote: >> I just realized that there's no class_methods family of methods in >> Ruby. I can't say: >> >> Array.class_methods >> >> instead I have to say: >> Array.singleton_methods > > Now that's the cool part :-) I love the fact that there's no > language-level notion of a "class method". In general, Ruby has this > way of providing a remarkably featureless (I use the word advisedly) > landscape, out of the featurelessness of which one can mold features. > So if you feel like there should be class methods, you can tap into > the fact that class objects can have singleton(ish) methods. But as > far as Ruby is concerned, there's no special case. I totally agree, and I'm sure that has nothing to do with the fact the Ruby for Rails is what finally crystalized all of this for me. I really love how that book introduces complex concepts like this so naturally. Everyone needs to read that book. Period. Oh, hi David! ;) James Edward Gray II