How to call a function with a variable value

def test()
puts “calling from variable”

x=“test” # or x=“test()”

From above code, how can I call function with the variable x.

dynamic method call in Ruby:

On Wed, May 9, 2012 at 4:28 PM, Raja T. [email protected]

You received this message because you are subscribed to the Google G.
“Ruby on Rails: Talk” group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at

David A. Prasetya
RoR Developers

skype: david.angga
phone: +62 85 222 1 5555 2