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
8
votes
1 answer

How do I document methods where providing a block is optional?

I have a function documented like this: ## # Searches for street names in the local address database. Returns a list # of strings, or invokes the block for each result. # # @param [String, Hash] query # # Can be: # # - A search string with…
Hubro
  • 56,214
  • 69
  • 228
  • 381
8
votes
1 answer

How do I use a markdown file as the main file for rdoc (in a rails project)?

Is it possible to use a readme.md file with a Rails project and have rdoc use it a the main page? I tried setting up my rake task as follows, but the index.html page that gets generated has a placeholder sentence. If I change to README.rdoc it…
Adam Pope
  • 3,234
  • 23
  • 32
8
votes
2 answers

How to preview RDoc file?

Want to see how an RDoc README file will look on Github before committing. How to run RDoc on a single file and preview the result in a browser?
B Seven
  • 44,484
  • 66
  • 240
  • 385
6
votes
2 answers

Nothing Known About ... when using ri Array -- Ruby

I have Ubuntu 11.10 and am using rvm with ruby 1.9.2. I followed this exactly to install Ruby: http://blog.sudobits.com/2011/10/27/how-to-install-ruby-on-rails-in-ubuntu-11-10/ I generate the docs with rvm docs generate This seems to work for a…
Shail Patel
  • 1,764
  • 5
  • 30
  • 46
6
votes
2 answers

Rails: how do I resolve the 'rake/rdoctask'' is deprecated' warning?

Just a forewarning: I'm a rails noob. When I run: rake db:migrate I get this deprecation warning: WARNING: 'require 'rake/rdoctask'' is deprecated. Please use 'require 'rdoc/task' (in RDoc 2.4.2+)' instead. at…
user2393462435
  • 2,652
  • 5
  • 37
  • 45
6
votes
5 answers

file 'lib' not found when installing rails 3.1 on Mac OS X Lion

I just installed rvm and then rails 3.1rc5 with: gem install rails --pre But I got some errors after "Installing ri documentation" and the RDoc documentation: Successfully installed 30 gems installed Installing ri documentation…
at.
  • 50,922
  • 104
  • 292
  • 461
6
votes
1 answer

Disable rdoc and ri from gemspec / Gemfile

I have a client gem which I will distribute business clients via rubygems. Gem client has cca. dozen gem dependencies and when it is being installed it takes a long time to install it due to generation of rdoc and ri for each gem. Clients are…
Haris Krajina
  • 14,824
  • 12
  • 64
  • 81
6
votes
2 answers

How to generate rdoc-style collapsable code sections?

I am creating internal documentation for a C++ project using Doxygen. I am having Doxygen include the source for methods, etc., but this makes the page kind of hard to scan. I'd like it to behave like rdoc and hide the source in a block that is…
Matthew Lowe
  • 1,350
  • 1
  • 17
  • 29
5
votes
0 answers

How to exclude module but include class of that module in RDoc

Running RDoc doesn't make sense for some modules that are blank. For example: class moduleName::className < ActiveRecord::Base def foo end def bar end end RDoc produces report: moduleName -> blank HTML moduleName::className -> complete…
Jackie Chan
  • 2,654
  • 6
  • 35
  • 70
5
votes
1 answer

Vim JSDoc, PHPDoc, JavaDoc, RDoc info

Here is the deal, If you've used Aptana, Eclipse or even Microsoft Expression Web editor, then you've seen that they feature a Balloon Text or Intellisense popup showing hints/info of built-in and custom objects, methods, etc. They get the info…
Jose Elera
  • 938
  • 9
  • 16
5
votes
1 answer

Does Ruby Yard have a feature comparable to RDoc :include: tag?

RDoc has the :include: tag (see the bottom of this page) that will take in an arbitrary text file and format as if it was indented wherever the include begins. This is a great way to pull in source code for documentation examples. Does Yard have a…
Luke Bayes
  • 3,234
  • 2
  • 25
  • 20
5
votes
1 answer

Problems installing rdoc, irb, bluecloth, chronic on fedora 12

What do these errors mean? [root@localhost config]# gem install bluecloth Building native extensions. This could take a while... ERROR: Error installing bluecloth: ERROR: Failed to build gem native extension. /usr/bin/ruby extconf.rb can't…
Vineeth Pradhan
  • 8,201
  • 7
  • 33
  • 34
5
votes
3 answers

Can I get my README.textile into my RDoc with proper formatting?

I like to use Textile or Markdown to write readme files for my projects, but when I generate the RDoc the readme file gets interpreted as RDoc and looks really horrible. Is there a way to make RDoc run the file through RedCloth or BlueCloth instead…
Theo
  • 131,503
  • 21
  • 160
  • 205
5
votes
2 answers

How do I create an arbitrary link in YARD documentation?

I'm trying to create some links in my YARD documentation. I can get an HTTP link: # I like {http://stackoverflow.com Stackoverflow} renders as

I like Stackoverflow

But an email link: # You can email…
James A. Rosen
  • 64,193
  • 61
  • 179
  • 261
4
votes
2 answers

Syntax highlight Ruby code in RDoc file?

I am documenting a Ruby library I am writing. In my README.rdoc file, I am including an example of the usage with some demo Ruby code. However, the resulting HTML documentation does not show the Ruby code with syntax highlighting, merely as a block…
mydoghasworms
  • 18,233
  • 11
  • 61
  • 95
1 2
3
14 15