In article <m2lmgmtl1h.fsf / zip.local.thomases.com>, Dave Thomas <Dave / PragmaticProgrammer.com> wrote: >ptkwt / shell1.aracnet.com (Phil Tomson) writes: > >> I think what I'm trying to do what I think is called the Proxy pattern in >> the GoF Patterns book. In the Proxy class I define method_missing so that >> any methods called on the proxy object that are not defined there are >> passed on to another object: >> >> >> Is there another way of doing this? > >Would the delegator class in the standard library do what you need? > > http://www.rubycentral.com/book/lib_patterns.html Maybe... I'll take another look at it. What I ended up doing was a simple change to method_missing: class ClientProxy #pass on any methods we don't know about to the client def method_missing(methID, *args) @drbObj.send(methID, *args) #was: @drbObj.send(methID,args) end end I had forgotten about using '*' to map the array into the arguments of the function. Phil