Stefano Crocco
1/7/2008 9:27:00 PM
Alle luned=EC 7 gennaio 2008, Bryan Richardson ha scritto:
> Hello all,
>
> How can I use a string variable as part of a method name I'm calling? For
> example say I want to call the method say_hello using the following:
>
> def say_hello
> puts "Hello!"
> end
>
> str =3D "hello"
>
> say_????
>
> Thanks in advance!! -- BTR
send "say_#{str}"
Stefano