From: "Morris, Chris" Date: 2001-10-27T02:56:44+09:00 Subject: [ruby-talk:23481] Capture undefined method calls? I've got the following line: document.form.ObjectID.value = 'x' form currently is an html dom node. What I'd like to do is something like (psuedo code falling out all over the place): def form # return a wrapper for the node NodeWrapper.new(document.form) end class NodeWrapper def initialize(node) @node = node end def someSortOfCatchAllForUndefinedCalls(*args) propName = nameOfUndefinedMethod # e.g. ObjectID if @node.hasProperty(propName) @node.propName.value = args[0] else assert(false, 'property does not exist') end end end then I could simplify the initial call to: form.ObjectID = 'x' # maybe, haven't accounted for = sign ... and get some additional testing code. Hmmm, well I'm not sure if this would be that useful to me now that I've thought it through, but I'm still curious if Ruby can do this sort of thing ... it seems like it could. Chris