2 task :doc => ['doc:generate']
5 project_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
6 doc_destination = File.join(project_root, 'doc')
10 require 'yard/rake/yardoc_task'
12 YARD::Rake::YardocTask.new(:generate) do |yt|
13 yt.files = Dir.glob(File.join(project_root, 'lib', '**', '*.rb'))
15 # [ File.join(project_root, 'README.md') ]
16 yt.options = ['--output-dir', doc_destination, '--readme', 'README.md']
19 desc "Generate YARD Documentation"
21 abort "Please install the YARD gem to generate rdoc."
25 desc "Remove generated documenation"
27 rm_r doc_dir if File.exists?(doc_destination)