Posted By

noah on 02/08/10


Tagged

html ruby doc rake documentation rdoc generate Task embedded Rakefile


Versions (?)

Howto set up a Rake task to generate RDoc documentation


 / Published in: Ruby
 

URL: http://rake.rubyforge.org/classes/Rake/RDocTask.html

For the --diagram and --fileboxes options to work you need GraphViz otherwise, delete those.

  1. require 'rake/rdoctask'
  2.  
  3. desc 'generate API documentation to doc/rdocs/index.html'
  4.  
  5. Rake::RDocTask.new do |rd|
  6. rd.rdoc_dir = 'doc/rdocs'
  7. rd.main = 'README.txt'
  8. rd.rdoc_files.include 'README.txt', 'CHANGELOG.txt', "config/**/*\.rb", "helpers/**/*\.rb", "script/**/*\.rb"
  9.  
  10. rd.options << '--inline-source'
  11. rd.options << '--line-numbers'
  12. rd.options << '--all'
  13. rd.options << '--fileboxes'
  14. rd.options << '--diagram'
  15. end

Report this snippet  

You need to login to post a comment.