From: Robert Klemme Date: 2006-08-15T03:30:07+09:00 Subject: Re: Get formal parameter names of a method? Jeff Cohen wrote: > Is there a way to reflect on a method to get the declard names of the > parameters? > > class Equipment > > def install(tool, packaging) > end > > end > > I can do this: > > m = Equipment.new.method(:install) > m.arity # => 2 > > I want to somehow find out that the client code has declared the > parameters named 'tool' and 'packaging'. > > Is this possible somehow? I feel like it should be, but I can't quite > figure it out. It's not possible without access to the source code or some major interpreter patches. Kind regards robert