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
13
votes
9 answers

How do I generate RDOC for (all of) Rails?

I can do sudo gem rdoc activerecord --no-ri and sudo gem rdoc actionpack --no-ri both of which give me good docs. But sudo gem rdoc rails --no-ri gives me pretty much nothing, as the Rails gem itself is really just a holder for the others. How…
James A. Rosen
  • 64,193
  • 61
  • 179
  • 261
12
votes
3 answers

Is there any way to easily link a file in RDoc?

I want to link to a documentation of a file in RDoc. but the only way I could do is with the following markup: configuration.rb[link:files/configuration_rb.html] I would like to do it in a better way, something like…
KARASZI István
  • 30,900
  • 8
  • 101
  • 128
12
votes
1 answer

How can I insert Rdoc comments in RubyMine

When I used Visual Studio I was used to inserting XML comments with just a few key presses at the beginning of the method definition (I think /// but it's been a while). Is there a way to insert an RDoc comment before a method inside of RubyMine out…
Jared
  • 1,450
  • 1
  • 13
  • 25
11
votes
2 answers

undefined method `reset' for RDoc::TopLevel:Class when installing a new Ruby gem

For example, $ gem install netaddr Fetching: netaddr-1.5.1.gem (100%) Successfully installed netaddr-1.5.1 ERROR: While executing gem ... (NoMethodError) undefined method `reset' for RDoc::TopLevel:Class The NoMethodError exception keeps being…
Huioon Kim
  • 121
  • 1
  • 5
11
votes
2 answers

How to document AngularJS + Ruby on Rails app?

I'm using yard to generate my documentation for Rails apps from an rdoc file. There are AngularJS documentation generators, but how could they be connected to generate one coherent document for an AngularJS + Rails app?
helcim
  • 789
  • 13
  • 27
10
votes
3 answers

Can Bundler be configured to install gems rdoc?

I use bdoc (with hanna for formatting) as a quick way of looking at the rdoc documentation for the gems installed on my system. However, because bundler does not install rdoc when installing gems, I'm constantly having to generate them manually…
idlefingers
  • 31,659
  • 5
  • 82
  • 68
10
votes
2 answers

How to document a rails application?

I just started to document a rails application. I know this is actually done by rdoc, so I followed some rdoc guides regarding syntax and so on, but I got stuck when I tried to describe attributes of models, validations and the relationship between…
ramontiveros
  • 309
  • 4
  • 11
9
votes
3 answers

error installing RDoc documentation: incompatible encoding regexp match

Over the last week, on a few gem install or gem update operations, I've received an error similar to these: ERROR: While generating documentation for sinatra-1.3.1 ... MESSAGE: error generating…
George Shaw
  • 1,771
  • 1
  • 18
  • 32
9
votes
2 answers

Adding documentation for model scopes in rails

I'm not sure if this is actually possible or not but I'm trying to make the documentation of our rails app more complete by adding documentation for the scopes in our app/models files. What I'm looking to try and do is: # This is a description of…
Chris Bailey
  • 4,126
  • 24
  • 28
9
votes
2 answers

What's the rationale/history for the # convention of identifying methods in Ruby?

For example, I've always seen methods referred to as String#split, but never String.split, which seems slightly more logical. Or maybe even String::split, because you could consider #split to be in the namespace of String. I've even seen the…
Justin L.
  • 13,510
  • 5
  • 48
  • 83
9
votes
1 answer

How to add RDoc documentation for a method defined using class_eval?

I am using class_eval to define a bunch of repetitive methods more concisely, something like this: %w{greasy chunky bacon}.product(%w{flying sky poodle}).each do |a,b| class_eval "def #{a}_#{b}; do_something; end" end I would like all the…
Alex D
  • 29,755
  • 7
  • 80
  • 126
8
votes
3 answers

Internal comments using YARD for Ruby documentation?

I'm in the process of switching over a rubygem I maintain from RDoc to YARD documentation. However, there are some critical comments in the code that need to remain only in the code and should not show up in the documentation. For instance: ## #…
Daisy Sophia Hollman
  • 6,046
  • 6
  • 24
  • 35
8
votes
2 answers

creating Rdoc for a rails app

I would like to generate a documentation to my rails (2.3.8) project. When I tried rake doc:rails rake doc:rerails It creates documentation for all the classes including standard ruby classes and all the ruby files in vendor directory (plugins…
sameera207
  • 16,547
  • 19
  • 87
  • 152
8
votes
2 answers

How can I install RDOC of gems already installed?

I have some gems that don't have ri/rdoc files and I'd like to know if there is a way to install this rdoc files.
vhbsouza
  • 407
  • 2
  • 5
  • 15
8
votes
1 answer

How do I document generated classes in Yard?

I have a class that I create from a factory function like this: Cake = MyProject.Struct(:type, :price) In Yard, it's simply displayed along with my constants: Cake = Struct(:type, :price) I want it to show up in the "Classes: " list. After…
Hubro
  • 56,214
  • 69
  • 228
  • 381
1
2
3
14 15