How to call a function with a variable value

def test()
puts “calling from variable”
end

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

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

dynamic method call in Ruby:
http://khelll.com/blog/ruby/ruby-dynamic-method-calling/

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


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
http://groups.google.com/group/rubyonrails-talk?hl=en.


David A. Prasetya
RoR Developers

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