Ah, good call. That's my bad, not Pablo's.

On Mon, Aug 16, 2010 at 10:19 AM, Brian Candler <b.candler / pobox.com> wrote:

> Pablo Torres N. wrote:
> > That would be
> >
> > def get(name,value)
> >   url_method_name = "create_#{name}".to_sym
> >   method = self.method(url_method_name)
> >   method.call(value)
> > end
>
> There's no need to create a Method object here, just use send:
>
> def get(name, value)
>  send("create_#{name}", value)
> end
>
> (or "self.send" if you think that reads better)
> --
> Posted via http://www.ruby-forum.com/.
>
>