D
Didier Prophete
I am wondering if there is a way to programatically get the name of the
arguments a function take.
Say, I have this code:
class MyClass
def my_fct(a, b, c)
end
end
Now, I can easily get a handle to the method 'my_fct' using:
mc = MyClass.new
meth = mc.method
my_fct)
But how do I get to the list of arguments of 'my_fct' ? I couldn't find
anything like:
meth.arg_list
which would return [ :a, :b, :c ], or something like that.
Is this even possible in ruby ?
-Didier
arguments a function take.
Say, I have this code:
class MyClass
def my_fct(a, b, c)
end
end
Now, I can easily get a handle to the method 'my_fct' using:
mc = MyClass.new
meth = mc.method
But how do I get to the list of arguments of 'my_fct' ? I couldn't find
anything like:
meth.arg_list
which would return [ :a, :b, :c ], or something like that.
Is this even possible in ruby ?
-Didier