Generating API Documentation
Getting an application object is not very useful if you don’t know which messages it responds to, as well as their purposes.
Documenting an Application
RubyOSA comes with a tool called
rdoc-osa which allows you to generate
documentation for the API that RubyOSA dynamically generates for a given
scriptable application. For example:
$ rdoc-osa --name iTunes [...] $ open doc/index.html
rdoc-osa acts as a front-end to the RDoc tool. By default it
generates HTML documentation in the
doc/ directory of the
current working directory.
RubyOSA provides the ability to merge Scripting Additions into an application. It is possible to also generate API documentation for additions:
$ rdoc-osa --addition --name StandardAdditions [...] $ open doc/index.html
Command Line Documentation
You can also generate RI documentation:
$ rdoc-osa --name iTunes --ri [...] $ ri current_track
To learn more about
rdoc-osa -h at the command line.