Add the ability to pass custom YARD options in to rake doc.

This commit is contained in:
Nathan Weizenbaum 2010-04-19 19:26:08 -07:00
parent a4a973cc70
commit c974e284dd
1 changed files with 4 additions and 0 deletions

View File

@ -248,6 +248,10 @@ begin
t.options << '--files' << files.join(',')
t.options << '--template-path' << scope('yard')
t.options << '--title' << ENV["YARD_TITLE"] if ENV["YARD_TITLE"]
if ENV["YARD_OPTS"]
require 'shellwords'
t.options.concat(Shellwords.shellwords(ENV["YARD_OPTS"]))
end
end
Rake::Task['yard'].prerequisites.insert(0, 'yard:sass')
Rake::Task['yard'].instance_variable_set('@comment', nil)