Say I’m writing some ruby code and I want to use the standard Date type to get the current date. Instead of using a search engine, is there a faster way to find the documentation for this class? I know I can get the methods for Date by typing Date.methods, but as far as I know this doesn’t provide details about argument types or return value.
Editor-specific answers are welcomed. My editor of choice is Emacs.
Bookmark the ruby core docs
Use your web browser’s find-text command.
Unexpected as it may seem, I find this is actually quicker than using
ri, which for some reason seems to take ages to start up.It is also much better than
ribecause the HTML page lists all the documentation for all the methods on a single page. Often methods are related to others, and switching between 2ri‘s is painful