The `Documentation` cop contains code that might be useful to you.