You need a send method:
obj.send(method_name) , where method_name can be either a string or a character, will call the method with the given name in obj .
Any arguments that you want to pass to the method can be specified as additional arguments for send , i.e. obj.send(method_name, argument1, argument2) .
source share