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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
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>
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Thanks.
James Edward Gray II
E