|
|
|
|
|
by jablan
1951 days ago
|
|
Sorry, Ruby methods are not objects. They can surely be wrapped in objects of class Method, but this feature is used quite rarely. Whether this is due to the syntax, the confusion regarding the evaluation scope, or something else, I have no idea. |
|
I think part of the confuction here is that "ob.puts" for example, does not directly access a method. It denotes passing a message to "ob". That message may or may not be routed to a "puts" method.
But at no point does Ruby allow you to get hold of any kind of reference to a method that is anything but an object.