Time to get better with ri and rdoc

All these days, googling was my primary method to search how to use tools/gems. I always used to find sample code which I could just read the re-implement in my programs.

I decided to improve that with Ruby. I learnt to use ri and rdoc. It's damn simple. For rdocs, do

gem server

and you can access the docs at http://localhost:8808. It binds to address 0.0.0.0 and not 127.0.0.1, which implies it's going to be available to computers connecting to that address using your IP. Makes sense when you want to run a server dedicated to docs in a networked office :)

ri <string>

Run that and you can search the ri for class and method names.

P.S: As a bonus, there's Radar's Lookup

Posted