Questions tagged [rdoc]

RDoc is the default embedded documentation generator for Ruby. Rdoc generates structured documentation that can be accessed via a web browser or the command-line by analyzing the code and specially formatted comments. Even in the absence of comments, rdoc will generate documentation using a programs structure.

RDoc analyzes Ruby source code to generate documentation. In the absence of comments, Rdoc uses the programs structure to produce documentation. With comments, which can be specially formatted using RDoc Markup, RDoc can create very detailed and useful documentation. Documentation generated via rdoc is accessible through the command line using ri. The RDoc Project's source code repository is hosted via github. RDoc was designed by Dave Thomas.

214 questions
4
votes
3 answers

Replacement for rdoc usage

According to this post, RDoc::usage is not currently available in ruby 1.9. Are there any good replacements available? I'd be interested to hear what's available from the standard install as well as what's available from gems.
Andrew Grimm
  • 78,473
  • 57
  • 200
  • 338
4
votes
4 answers

How to generate Ruby documentation using different template?

I want to generate the Ruby documentation with hanna template. How to do that? Or where can I download it if it's available at all? Using rdoc -o ~/doc --inline-source --line-numbers --format=html --template=hanna gives me docs with missing methods.…
htanata
  • 36,666
  • 8
  • 50
  • 57
4
votes
1 answer

Line continuation in rdoc

I have inherited a bunch of Ruby code with rdoc comments, but many of the options and attributes are multi-line, such as: # +param+:: Here is a parameter with a really long description # that won't fit in one line The end result is really hard to…
robbie.huffman
  • 423
  • 4
  • 12
4
votes
3 answers

How do I represent square brackets ([]) in RDoc?

I am trying to document some rake tasks I've written using RDoc comments in my class and am running into trouble representing square brackets. I want to add some examples of how to run my rake tasks with parameters and so have an rdoc line like…
Aaron Janes
  • 304
  • 3
  • 11
4
votes
1 answer

`require': cannot load such file -- rdoc/usage (LoadError)

I'm getting this error when running my script: `require': cannot load such file -- rdoc/usage (LoadError) from /Users/S/.rvm/rubies/ruby-2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file --…
Sophie
  • 43
  • 4
4
votes
2 answers

Why is Ruby's DateTime.new_offset not in rdoc

I wanted to create a DateTime instance for the UTC time zone using the answer from this SOF post that uses the method DateTime#new_offset(0). However, I am not able to find its definition in either the DateTime rdoc or the rdoc of its parent class…
ecbrodie
  • 11,246
  • 21
  • 71
  • 120
4
votes
2 answers

How do I add documentation to my gem that will show up on rubygems.org?

Experimenting with pushing my first gem to rubygems.org, and I'm trying to figure out how to generate online documentation for it. For most gems 'show' page, when I click the 'Documentation' link, I am brought to…
Benjamin R.
  • 323
  • 2
  • 14
4
votes
1 answer

Why does it take longer to install RDOCSs and RIs than the actual gem?

It is always frustrating to install a gem and wait 2 seconds for the gem to install and then wait 30 seconds for the docs, which I never use(Google, anyone?). Why do we force this convention upon ourselves when the local docs normally aren't even…
Josh
  • 5,631
  • 1
  • 28
  • 54
3
votes
1 answer

Building Ruby Documentation for Java Classes/Source

As I've recently started using JRuby, more specifically building Java applications using Ruby code, I've started using Java Libraries such as LWJGL and Slick. I know JRuby changes Java method names to a more ruby-esque structure, my question is, is…
Port3M5
  • 47
  • 5
3
votes
1 answer

Getting RSpec into RDoc

In Ioke doc, the ISpec tests are included in the documentation, see ioke.org/dok/index.html How can this be done with Ruby's RSpec and RDoc (or SDoc)? I can't find any commandline switches or external libs to do so. Any ideas (not including…
bb.
  • 1,371
  • 1
  • 14
  • 21
3
votes
1 answer

How make contents of README_FOR_APP appear in doc/app/index.html

I'd like the contents of doc/README_FOR_APP appear in doc/app/index.html, when I do rake doc:app. Currently, the content is: This is the API documentation for Rails Application Documentation. To see README_FOR_APP, I have to click on…
sheldonh
  • 2,684
  • 24
  • 31
3
votes
0 answers

Show ruby core and standard documentation when running gem server

Is there a way to show the ruby core and standard library documentation when running gem server? I can navigate the core & std documentation created with rvm, but I would like to have all the documentation in one place. I've run rvm docs…
Augusto
  • 28,839
  • 5
  • 58
  • 88
3
votes
1 answer

Generating RDoc to LaTeX

Is it possible to generate RDoc in LaTeX format? I looked at RDoc and YARD, but didn't find what I need. I am writing a documentation in LaTeX for my project in Ruby, and I need a way to easily embed the API reference, as an appendix or as a…
Piotr Turek
  • 346
  • 1
  • 2
  • 11
3
votes
1 answer

linking to a method by the same name in a different class (Rdoc)

I'm documenting some ruby code right now. We have two classes that both have a method called "host". In one of these classes the method needs some special comments. In the other class I'd like to refer to the first class, and have that reference be…
Ziggy
  • 21,845
  • 28
  • 75
  • 104
3
votes
1 answer

Is it possible to generate Rdocs after a gem has already been installed?

I installed a gem using the --no-rdoc flag but now I am regretting it! Can I somehow generate my rdocs without having to reinstall the gem?
maček
  • 76,434
  • 37
  • 167
  • 198