Currently we only have provision for this in ruby-fakegem.eclass, where we rely on the package itself to provide API documentation. This approach has a number of problems:
- not all packages provide API docs
- some packages only provide API docs functionality in the tarball, not the gem
- most packages require additional dependencies for documentation tasks (e.g. hoe, echoe, etc.)
- generated documentation is inconsistent (packages use their own templates, etc.)
A better approach would be to have supporting methods in ruby-ng.eclass that create API documentation in a consistent manner, perhaps even using a Gentoo-specific template. In the same pass we could also generate ri documentation which we currently don't do.
ruby-fakegem.eclass has RUBY_FAKEGEM_RECIPE_DOC="rdoc" which handles API documentation handling outside of the package.
In a future EAPI we can change the eclass to use this recipe by default.