Hi --

On Mon, 12 Jul 2004, Elias Athanasopoulos wrote:

> Hello!
> 
> I want to create class methods at run-time, so I use
> Object#const_missing. But, I must to know the name of
> the class method which was called. Is there a way to do 
> this via the Ruby C API (or in Ruby in general)?
> 
> I.e. when the user calls Foo.bar, I need to know (inside
> const_missing) that somebody tried to call the class
> method 'bar' of Foo.

Interesting question, but I suspect the answer is that you can't.
const_missing is called when "Foo" is encountered -- which means no
one has tried to call "bar"; execution didn't get that far.  

That's my reasoning, anyway.  You may get more mileage from other
answers.


David

-- 
David A. Black
dblack / wobblini.net