From: Avdi Grimm Date: 2011-02-18T00:03:09+09:00 Subject: Re: Defining class methods On Thu, Feb 17, 2011 at 4:41 AM, Shadowfirebird wrote: > I don't mean it as a put-down; I suspect the only person I'm putting down is myself.   But I don't find that class methods actually come up much in my Ruby coding; when I find myself coding one I tend to stop and think hard about whether I actually need it. Indeed. Class methods in Ruby are a code smell: not always wrong, but you should always think about why you're choosing a class-level method instead of instance-level. I think most of the class/module-level methods I write are "macros" - e.g. methods along the lines of Ruby's #attr_accessor. -- Avdi Grimm http://avdi.org