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

Is there a good, solid reference for proper RDoc syntax?

I'm looking for a good, solid reference for proper RDoc syntax. Recommendations? I can't seem to find anything that clearly shows: How to document class methods and their parameters How to document what a class or class method does.
Levi Hackwith
  • 9,232
  • 18
  • 64
  • 115
48
votes
2 answers

How do I add existing comments to RDoc in Ruby?

I want to format my existing comments as 'RDoc comments' so they can be viewed using ri. What are some recommended resources for starting out using RDoc?
CodingWithoutComments
  • 35,598
  • 21
  • 73
  • 86
36
votes
3 answers

What is the difference between ri and rdoc

Whenever I install gems I see ri and rdoc follow. I know this is documentation but what is the difference between the two and how to use them?
thenengah
  • 42,557
  • 33
  • 113
  • 157
34
votes
3 answers

Nothing known about.... when trying ri String#upcase Ruby

I have just installed the RVM and I am reading The Well-Grounded Rubyist book. In the first chapter I am supposed to try ri String#upcase to view documentation on the upcase method, however I get a message saying: Nothing known about…
LuckyLuke
  • 47,771
  • 85
  • 270
  • 434
34
votes
1 answer

Why does my Ruby 'ri' tool not return results in command prompt?

Possible Duplicate: ruby 1.9 ri problem When I try to use Ruby's ri tool in a command prompt window to get help about classes, methods, etc. it seems to always fail. For example if I type: ri Array I get a message saying: Updating class cache…
caeious
30
votes
1 answer

yard and links to classes/modules in the doc

I'm currently switching from rdoc to yard for my ruby software documentaion. In my doc I often reference some classes/modules from the comments, for instance : ## == Provides various utility features ## ## == Features ## ## Logging : logging is…
devlearn
  • 1,725
  • 2
  • 17
  • 30
29
votes
1 answer

How should I provide YARD/RDoc documentation for Ruby keyword arguments?

For a basic Ruby method, I would provide YARD style doc for parameters in the following format. # @param query [String] The search string to query. # @param options [Hash] Optional search preferences. def search(query, options = {}) #…
Matt Huggins
  • 81,398
  • 36
  • 149
  • 218
28
votes
6 answers

How do you remove the documentation installed by gem install?

I know it's possible to install a gem without the documentation, but unfortunately, I didn't for the first three months I used ruby. In that time, I managed to install a significant amount of gems, but not once since I started using ruby have I used…
bloudermilk
  • 17,820
  • 15
  • 68
  • 98
25
votes
1 answer

YARD is not the same as RDoc?

Correct me if I'm wrong, is YARD not the same as RDoc? It's not based on RDoc but a total rewrite? So if I'm using YARD, I don't have to bother with RDoc right?
never_had_a_name
  • 90,630
  • 105
  • 267
  • 383
25
votes
3 answers

Is it normal that YARD doesn't replace `code` with code?

I'm just starting to use YARD for documenting my Rails app. I didn't specify any specific Markup handler, but I would have expected that `code` would be converted to code, which doesn't seem to happen. Is this normal behavior? Do I have to add some…
Joshua Muheim
  • 12,617
  • 9
  • 76
  • 152
22
votes
2 answers

Why is the ":nodoc:" syntax needed?

It seems a lot of libraries/plugins use this syntax: def self.included(base) # :nodoc: base.extend ClassMethods end Why is the :nodoc: part necessary?
Bryan Locke
  • 2,337
  • 5
  • 25
  • 30
16
votes
4 answers

no such file to load -- rdoc/task

When I run rake db:create I receive this error rake aborted! no such file to load -- rdoc/task (See full trace by running task with --trace) Here is the --trace /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in…
Jarred
  • 1,986
  • 5
  • 27
  • 42
15
votes
2 answers

How to rebuild rdoc for all the installed gems?

I have several gems installed in multiple locations. What is the hard/easy way to generate/re-generate: rdoc for all these installed gems, all at once? yardoc for all these installed gems, all at once?
Dharam Gollapudi
  • 6,328
  • 2
  • 34
  • 42
14
votes
1 answer

Documenting yaml

Is there something like javadoc or rdoc for documenting YAML files, so that we could extract it into HTML documentation? Ideally with markdown syntax.
Mladen Jablanović
  • 43,461
  • 10
  • 90
  • 113
13
votes
2 answers

Can you install documentation for existing gems?

Rubyinside mentioned a blog post on how to speed up gem installation by not installing RI or RDoc. Is it possible to install a gem and subsequently install documentation at a later date, so you can hack in haste and RTFM at leisure?
Andrew Grimm
  • 78,473
  • 57
  • 200
  • 338
1
2 3
14 15