suppose I have 2 strings:
s1 = “hello”
s2 = “capitalize”
I want to do this:
m = s2.to_method
I’m working on a Rails project where I want to call arbitrary methods of
At run-time …
I know how to get the names of the methods,
but can’t figure out how to call the corresponding methods.
How I convert string to method?