Calling Methods Dynamically : send « Method « Ruby






Calling Methods Dynamically



"this is a test".send(:length) # 13 
"this is a sub".send("sub", /iles/, '.') 

 

Related examples in the same category

1.Built-In Reflection