On Dec 12, 11:44 pm, Chintana Wilamuna <chinta... / gmail.com> wrote:
> Hi,
>
> If I declare a function that expects 3 arguments,
>
> def bar(x, y, z)
>   ...
> end
>
> and later, if I have the function name in a string, is there a way to
> get the parameter names using reflection in Ruby?

There is not; as Bernardo said, Ruby only allows you to check the
arity of the method.

I had a need for this, too. (I was working on a project that allowed
developers to provide arbitrary Ruby-based plugins, and the GUI of the
application needed to expose the methods and their paramters
visually.)

For that need, I wrote this:
http://phrogz.net/RubyLibs/rdoc/classes/DescribeMethods.html