method

inspect

v2_6_3 - Show latest stable - Class: Method
inspect()
public

Returns a human-readable description of the underlying method.

"cat".method(:count).inspect   #=> "#<Method: String#count>"
(1..3).method(:map).inspect    #=> "#<Method: Range(Enumerable)#map>"

In the latter case, the method description includes the “owner” of the original method (Enumerable module, which is included into Range).