Is there call_user_func_array() analog in Ruby? And how about create class from string, that contains class name. I found only with “eval”…
Is there call_user_func_array() analog in Ruby? And how about create class from string, that
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you want to call a dynamic method name, use
send:This, if
i = 1will call themethod_1onuserobject.Rubyuses the terminology “an object sends a message to another object” instead “calls a method/function”.