--00032555e4ceb9c2fe049c7cb68f Content-Type: text/plain; charset=ISO-8859-1 On Thu, Feb 17, 2011 at 2:41 AM, Shadowfirebird <shadowfirebird / gmail.com>wrote: > And when I do use one it's always your type (1). Why would I want to define > a class method anywhere else but in the class? I do understand that for > DSLs, all the rest of this syntax is really useful. But -- showing my > ignorance here -- is it really of any practical value elsewhere? Well, more specific than DSLs: metaprogramming, and DSLs that generate code. Some of the more abject design patterns, such as the factory pattern, can often be avoid thanks to a combination of Ruby's dynamism and class methods. The class is also a great place to stick state shared by all instances of that class, such as the configuration details for accessing a particular network service. -- Tony Arcieri Medioh! Kudelski --00032555e4ceb9c2fe049c7cb68f--