timsuth
3/6/2005 7:28:00 AM
In article <1109580197.206700.52550@o13g2000cwo.googlegroups.com>, George
Moschovitis wrote:
>Hello everyone,
>
>I would like to use some kind of reflection to get the parameters of a
>method.
>For example:
>
>class MyClass
> def simple_method(last_name, name)
> end
>end
>
>method_params(MyClass, :simple_method)
>=> [:last_name, :name]
>
>I have implement this using ParseTree, but since ParseTree uses
>RubyInline which requires a C compiler, and AFAIK is not portable, I
>would like a better solution.
When Ruby gets named parameters, I guess this will be provided. Not quite
the answer you're looking for ;-)