How do you run rdoc on single files without overwriting all other files?

370 Views Asked by At

I am working on a very large rails project and I want to standardize the usage of rdoc in the codebase. I figured I could run it once over the whole project (to at least generate docs for the classes and methods themselves) and then devs can add single files as they add documentation.

The problem is that if I run rdoc /path/to/some_file.rb, it then removes all other files from the generated index.html, and only includes the one. Running rdoc on the whole project takes 3-4 minutes and it shouldn't be necessary to parse the entire project every time new comments are added. The output of rdoc --help provides no solutions.

Is there a way to configure rdoc such that it will always persist docs until I specifically run rdoc over those files again?

Thanks for any insight!

1

There are 1 best solutions below

0
Bartosz Pietraszko On

I don't think rdoc removes anything from index.html, just overwrites it and isn't actually capable of modifying it. Regarding performance, I'm not 100% sure but most likely rdoc doesn't cache the parse results. Yard does, with -c, --use-cache option, and it speeds up things significantly.