thanks, Brian.

That's a great solution.
It works.




On Mon, Nov 12, 2012 at 11:23 PM, Brian Candler <lists / ruby-forum.com>wrote:

> salamond wrote in post #1084048:
> >       define_method(method_name) |*args| # problem is here. how can I
> > define a method, with dynamic numbers of variables?
>
> I think class_eval %Q{def method(#{args.join(",")}) ... end} is your
> best bet.
>
> --
> Posted via http://www.ruby-forum.com/.
>
>