C
Chintana Wilamuna
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? Something similar
to the following PHP snippet,
$a = new ReflectionFunction("function_name");
$a->getParameters();
Thanks in advance,
Bye,
-Chintana
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? Something similar
to the following PHP snippet,
$a = new ReflectionFunction("function_name");
$a->getParameters();
Thanks in advance,
Bye,
-Chintana