Tracking Your Rdoc Coverage with RdocMetric

I was surprised when I didn’t find a Ruby gem that would analyze your code and give you a metric for how thorough your Rdoc documentation was. Since I want to keep myself accountable to keeping code documented, I whipped up the rdoc_metric gem. So far it is very simple, giving you percentages of how many of your class, module, method, attribute and constant declarations are documented using Rdoc.

Usage is simple, just cd into your application directory and use the rdoc_metric command:

cd ~/apps/my_app
rdoc_metric

Or, if you want to get specific and only get metrics for a specific directory of your app (say, your models):

cd ~/apps/my_app
rdoc_metric app/models

Download it here on GitHub