Re: RDoc XML



> I would like to get a convenient listing of all current Ruby
> documentation included in the source. I see that RDoc supports XML
> (which would be fine) and I try:
>
> /ruby$ rdoc --all -f xml -n ../ruby_doc.xml
>
> That gives me a lot of date, but it doesn't seem to include the
> methods themselves. Is there any way to get them in the XML, or do I
> need to build the HTML docs and parse out what I want?

Not exactly what you requested, but let me offer this anyway:
my rdoc-hacks can normalize RDoc output to a fairly sensible
data format (see spec below) from which an example file can
produce YAML output. It should be able to handle the entire
ruby distribution (at least 1.9 is OK by my testing).

Examples:

http://www.magical-cat.org/projects/ruedoc/examples/yaml/data.yml
http://www.magical-cat.org/projects/ruedoc/examples/ruby-1.9/

Documentation:

http://www.magical-cat.org/projects/ruedoc/rdoc/

Get it from:

http://www.magical-cat.org/projects/ruedoc/downloads/ruedoc-0.1.2.tar.gz


=============================================================
Normalized data format in YAML:

modules: <as classes>
classes:
-
name: <name of the class>
parent: <parent class>
type: <class or module>
desc: <class description>
files:
-
path: <relative path to file where class defined>

constants:
-
name: <name of the constant>
value: <value of the constant>
desc: <description of the constant>

public_class_methods:
-
name: <method name>
params: <(parameters)>
desc: <description>
source: <source code>
example: <example of calling the method> # C methods only

protected_class_methods: <as above>
private_class_methods: <as above>
public_instance_methods: <as above>
protected_instance_methods: <as above>
private_instance_methods: <as above>

files:
-
name: <filename>
path: <relative path>
desc: <description>
modified: <modification timestamp>
requires:
-
name: <library name>

================================================================
> Thanks.
>
> James Edward Gray II

E



.



Relevant Pages

  • Bug or bad documentation for Array.insert()
    ... I just came across ruby and noticed a difference between the behavior of ... Array.insertand its documentation. ... From the RDoc it seems that two arguments are mandatory, ... be irritating for beginners. ...
    (comp.lang.ruby)
  • [ANN] rdoc 3.6 Released
    ... RDoc Documentation: http://docs.seattlerb.org/rdoc ... RDoc produces HTML and command-line documentation for Ruby projects. ... inherited methods. ...
    (comp.lang.ruby)
  • Re: [ANN] RDoc 2.2.0 released
    ... because I downloaded the previous version of RDoc ... had it rebuild my ri documentation, because I wanted to obtain the new ... because I am way back in the past using Ruby ... Is this because the 1.8.6 source files are ...
    (comp.lang.ruby)
  • Re: rdoc question: C v Ruby
    ... in C and the ones in Ruby (including a general explanation of the ... When I run rdoc, however, it only uses the inline documentation from ...
    (comp.lang.ruby)
  • Re: ruby html (or xhtml) forms class...
    ... xx is a library designed to extend ruby objects with html, xhtml, and xml ... xml or xhtml as clean looking and natural as ruby it self. ... attributes may be passed to any tag method as either symbol or string. ...
    (comp.lang.ruby)