From: Mark Hubbart Date: 2005-02-17T05:53:05+09:00 Subject: Re: adding a dynamic method handler? (long post) On Wed, 16 Feb 2005 18:19:50 +0900, Robert Klemme wrote: > > "Mark Hubbart" schrieb im Newsbeitrag > news:de63abca0502152303763354f7@mail.gmail.com... > > Hi, > > > > I've been using method_missing overly much in my code lately, and it's > > prompted me to think a lot about it's limitations. > > > > > So, any thoughts? > > I'm wondering in which situation you need this. Although I understand the > benefits of your approach I don't see the use case for this. Basically this is for any time that you want the code re-use and ease of implementation afforded by method_missing, but the benefits of still having the methods behave mostly as if they were actually defined, rather than handled dynamically. This is useful for quickly defining wrapper objects, or objects that delegate to multiple other objects. The idea is that this would be a way of dynamically creating methods for an object, without resorting to relatively permanent methods like "class << self; define_method(:foo){...}; end". cheers, Mark