From: Robert Klemme Date: 2010-06-22T17:06:15+09:00 Subject: Re: Got to be a better way to code class variables.... 2010/6/22 Joel VanderWerf > > Dave Howell wrote: >> >> I'm trying to set up an object with overridable defaults, so it will act like this: Question is, do you really need this: >> I'd like to have other methods that worked the same on the class and the instance, but the only way I can figure out how is to type every single method twice. There has *got* to be some terribly clever ruby-esque way of including instance methods as class methods or vice versa, no? ? You only need setters on the class if you want to be able to modify the default. If not, you can use a different approach (see below). > Some metaprogging... Some more metaprogramming: http://gist.github.com/448155 Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/