Method_missing will be executed on a class when you call a method that
is missing on that class.  

Example:
	def method_missing(symbol, *arguments, &block)
		#do something
	end

-----Original Message-----
From: Mirian Crzig Lennox [mailto:mirian / cosmic.com] 
Sent: Tuesday, October 29, 2002 5:05 PM
To: ruby-talk ML
Subject: Dynamically executed methods in Ruby?


This is a little hard to explain, and I'm not sure if Ruby can actually
do this, but here goes.

I want to write a class with a method, say "method_handler" which
"traps" all calls to undefined methods and executes them somehow.  For
example:

	  class Foo
	    def	method_handler(meth, *args)
	      # meth is the symbol representing the name of the method
	      ... code to determine what happens ...
	    end
          end

I suspect that it may be possible to do this with an event, but I'm a
little hazy on how that would work.

--Mirian