Tobias Reif <tobiasreif / pinkjuice.com> writes:

> >>What would be the simplest way to use it from a program?
> >>one path to one file for example.
> >>(... to generate documentation for generated Ruby files.)

RDoc now let's you call RDoc programmatically

  begin
    r = RDoc::RDoc.new
    r.document(ARGV)
  rescue RDoc::RDocError => e
    $stderr.puts e.message
    exit(1)
  end

ARGV can be your own array of options and file names (not a string)

Along with this, I've added a --quiet option which suppresses output.


Dave