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
3
votes
2 answers

Generating RDoc fails with Directory .ext/rdoc already exists

I'm just installing Ruby Enterprise and cannot change the output directory for this crashing command called by Ruby Enterprise installer. So how do I delete the directory to satisfy this exception: Generating RDoc documentation ./miniruby -I./lib…
Murdoch
  • 630
  • 2
  • 8
  • 21
3
votes
0 answers

How do I force rdoc to document a concern's class_method(s) as class methods?

I'm writing a gem for ActiveRecord that provides a Concern. One of them installs a singleton method (aka class method), and I want to document it with rdoc. After reading the rdoc documentation, I hoped this would work: module MyModule extend…
inopinatus
  • 3,597
  • 1
  • 26
  • 38
3
votes
1 answer

Add Ruby Source Code as HTML to RDoc

How do I include a ruby code file, as is, into RDoc? I have an example.rb file that documents how to use my gem and I would like to include that as one of the files like the README.rdoc and HISTORY.rdoc. I've already figured out how to convert the…
Mike Bethany
3
votes
1 answer

Rake aborted! Don't know how to build task 'doc:app'

The official documentation indicates that I should be able to build documentation for my application using rake doc:app, but when I run the command in Rails 5 I get the following output: bwerth@bwerth-VirtualBox:~/rails/gep$ rake doc:app rake…
Brad Werth
  • 17,411
  • 10
  • 63
  • 88
3
votes
1 answer

How can I list the undocumented modules/classes/constants/methods with rdoc?

I have a Rails app that I am documenting with RDOC. When I run the rake rdoc command, it tells me: Classes: 96 ( 6 undocumented) Modules: 22 ( 14 undocumented) Constants: 12 ( 11 undocumented) Attributes: 27 ( 27 undocumented) …
altuzar
  • 472
  • 4
  • 7
3
votes
1 answer

Documentation as tests in Ruby?

There is a great tool rustdoc (currently used by cargo) to test examples of documentation comments in Rust. Does rdoc or yard give us something similar in Ruby?
Vitalii Elenhaupt
  • 7,146
  • 3
  • 27
  • 43
3
votes
1 answer

How can I document implicit methods inside of rails models?

I'm using YARD on my Rails project and was wondering how I would go about documenting inherited/runtime methods on a Rails model? For instance documenting the existence of a first_name attribute on a User model.
capotej
  • 2,861
  • 3
  • 21
  • 16
3
votes
2 answers

How do you generate rDoc for a particular plugin using rake

OK, I am trying to generate the rDoc for paperclip, but the rake task is choking on another plugin before it gets to it, so this is out of the question: rake doc:plugins I could go and fix up the broken plugin, but I'm busy and lazy, so I just want…
Codebeef
  • 43,508
  • 23
  • 86
  • 119
3
votes
2 answers

Ruby RI fails with instance of RDoc::Context::Section needs to have method `marshal_load' (TypeError)

I am running Rails 3.2.14 under Ruby 2.0.0 (rvm) on OSX. When I attempt to access the ri documentation for most methods, I get the following stack trace. stack…
Daryl Robbins
  • 173
  • 1
  • 10
3
votes
2 answers

Best wiki syntax for documentation in ruby code and project README files

Are there any wiki syntax like rdoc, markdown, ... recommended in the ruby world? I write sometimes open source code and have no glue which syntax I should use in Code documents and in README files. What be helpful for me which and why you use it.
gustavgans
  • 5,141
  • 13
  • 41
  • 51
3
votes
1 answer

Ruby inline documentation

In IRB, or other interactive interpreter such as pry, how can I get some inline documentation on objects and methods? For example, I can get this far: [1] pry(main)> x = 'hello world' => "hello world" [2] pry(main)> x.st x.start_with? x.strip …
wim
  • 338,267
  • 99
  • 616
  • 750
3
votes
2 answers

Displaying inherited methods in rdoc

I have a program written in Ruby that uses multiple levels of inheritance. All of the parent classes have implemented methods that an object of a child class would use, but when I generate an rdoc for my program, the rdoc page for a child class…
juan2raid
  • 1,606
  • 1
  • 18
  • 29
3
votes
1 answer

"rvm docs generate" is killed

Any idea why rvm(1.18.15) fails to generate the document for ruby2.0? $ rvm docs generate ri documentation, be aware that this could take a long time, and depends heavily on your system resources... ( Errors will be logged to…
canoe
  • 1,273
  • 13
  • 29
3
votes
1 answer

Where is rbenv gem's rdoc?

I'm using rbenv and I'm trying to figure out where the rdoc of my local gems are located. When I install a gem, it says the rdoc are properly generated, i.e.: % gem install rails -v "2.3.2" Successfully installed rails-2.3.2 1 gem…
Adrien Coquio
  • 4,870
  • 2
  • 24
  • 37
3
votes
1 answer

"undocumented" constants in Ruby/Rdoc

The following code snipped: # ansi console color constants COLOR_BLACK = 0 COLOR_RED = 1 COLOR_GREEN = 2 COLOR_YELLOW = 3 COLOR_BLUE = 4 COLOR_MAGENTA = 5 COLOR_CYAN = 6 COLOR_WHITE = 7 # functional color aliases COLOR_WARN =…
rhavin
  • 1,512
  • 1
  • 12
  • 33