rdoc

RDoc XML generation

I'm trying to generate a RDoc using the XML format. Here's the command that I'm using: $ rdoc --fmt=xml --opname=api.xml The file is created but no method list is generated. I'm using rdoc (2.4.3). The RDoc template for XML include tags for method displaying. Is it possible? ...

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

Greetings, When I try to use Ruby's ri tool in a command prompt window to acquire information about classes, methods, etc. it seems to always fail. For example if I type ri Array I get a message saying Updating class cache with 0 classes... Nothing known about Array What should I do to configure Ruby's ri tool to work? Thanks. ...

Can Doxygen generate collapsable code sections like rdoc?

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 collapsed by default. I thought that HTML_DYNAMIC_SECTIONS might let me do this, but alas, the...

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 only shows the methods for that specific class and no methods from the parent class. Does an...

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

Hi, 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. ...

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? ...

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 the documentation on my computer. I always look to docs on the internet. What is the bes...

Automating rake doc:app

For you rails programmers, what's the easiest way to keep your RDoc files up-to-date? I know I can run rake doc:app manually, but I really don't feel like adding a manual step to the check-in process, and since we're already using cruisecontrolrb to handle deployment and testing automation, it seems like there should be an easy way to r...

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 of its own formatter? Can it be configured to autodetect the formatting from the file suff...

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 this: <file>configuration.rb</file> Is there any existing markup rule to do this? EDIT: of course I've tried without...

Make RDoc parse unchanged files too

Hi, Is there any parameter to rdoc that tells it to include all unchanged files again, too? Calling rdoc a second (third, fourth) time, just parses the files that have been changed and index.html only shows the content of this parsed file. The other files are still available in the subdirectory but not shown. Might be an easy thing - ...

What parts of a Ruby-on-Rails application (with reasonably expressive unit tests) should have RDoc?

I'm developing an open-source web application on top of Rails. I'd like to make my code as easy to understand and modify as possible. I'm test-driving my development with unit tests, so much of the code is "documented" through test cases (what each controller action expects as input, what instance variables are set for output, how help...

rdoc and the "--accessor" option

rdoc --help says: --accessor, -A accessorname[,..] comma separated list of additional class methods that should be treated like 'attr_reader' and friends. Option may be repeated. Each accessorname may have '=text' appended, in which case that text appears where the r/w/rw appears for normal accessors. Does anyone h...

RDoc template customization

Hi, how can I change my default RDoc template for my gem environment. I'd like my gem server to look like this RDoc: http://getcloudkit.com/api/ and I've seen that design around so this shouldn't be so difficult. ...

Create doc for rails, plugins, app in a single file

I was wondering what the best option for generating doc for rails, its plugin and the app in one single file that I can navigate. I've been using rdoc but that creates multiple files, yard is too slow and hanna gets stuck at random places. Any help? ...

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. ...

Using RDoc and Executing Code - Annotating

I have a series of Ruby methods andI would like to dump their return values out to a formatted report. However, I'd also like to annotate these results (i.e. with descriptions of what the value is), and I was wondering if I could use the existing comments on each method to do this annotating? So I guess what I want to do is output the r...

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

Hello, 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 find header files for ruby. Gem files will remain installed in /usr/lib64/ruby/g...

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 method alone, when the class is assumed/implied (#split). I understand that this is the way me...

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? ...