This post originated from an RSS feed registered with Ruby Buzz
by Red Handed.
Original Post: Stick it in Your ~/.irbrc: MethodFinder
Feed Title: RedHanded
Feed URL: http://redhanded.hobix.com/index.xml
Feed Description: sneaking Ruby through the system
class MethodFinder
def initialize( obj, *args )
@obj = obj
@args = args
end
def ==( val )
MethodFinder.show( @obj, val, *@args )
end
end
class Object
def what?(*a)
MethodFinder.new(self, *a)
end
end
In any case, use the syntax easiest to remember. Lest we need a whatwhat?