From: Robert Klemme Date: 2004-08-28T18:00:36+09:00 Subject: Re: Method name to method object "Sean O'Dell" schrieb im Newsbeitrag news:200408271242.37206.sean@celsoft.com... > I want to obtain method objects given their string names. I can't figure out > how to get the method object for MyMethod::mymeth given the string name > "MyMethod::mymeth". I don't know the name of the module in advance, or even > if any was given (or even how many levels of modules deep the method is), so > I can't use something like MyMethod::method("mymeth"). > > How does one do that? > > Sean O'Dell > > >> class Foo;def bar;end;end => nil >> Foo.instance_method :bar => # >> Foo.instance_method "bar" => # >> Foo.new.method :bar => # >> Foo.new.method "bar" => # Kind regards robert