Obromios
Obromios

Reputation: 16383

View a rdoc file in a ruby gem

I want to read some of the documentation for the rb-gsl gem. For example the rdoc file for the multimin class. How do I view this file in a browser and follow the links that are in the file (which appear to refer to other rdoc files in the same repository).

Upvotes: 1

Views: 406

Answers (1)

DannyB
DannyB

Reputation: 14776

There are at least two options I know of to view rdoc documentation for gems:

  1. Using the online documentation - for example: https://rubydoc.info/github/SciRuby/rb-gsl/master
  2. Using Yard

With Yard, you can do many things, including running a local server to show the documentation for all the installed gems.

$ gem install yard
$ yard server --gems --port 3000

Then, visit http://localhost:3000 to see a list of gems, each with its full documentation.

Upvotes: 4

Related Questions