Friday, November 14, 2014

Do maximum use of ri

ri is a tool that ships with Ruby. It's a companion to rdoc, allowing you to 'display information about Ruby classes, modules, and methods' from your console.

It give benefits like:
  • More Accurate results :-
    type ri new
    It will return you the list of new methods in the installed.
  • Interactive response :-
    type ri -i
    it gives you the auto complete feature.
  • Gives you more details about the class.
    start ri -i
    type String
    It will show you the detail structure including parent class, modules and who all extend it.
 If you are using rvm you have to generate ri documentation first by
rvm docs generate all

No comments: