class YARD::Rake::YardocTask
The rake task to run {CLI::Yardoc} and generate documentation.
def define
-
(void)
-
def define desc "Generate YARD Documentation" unless ::Rake.application.last_description task(name) do before.call if before.is_a?(Proc) yardoc = YARD::CLI::Yardoc.new yardoc.options[:verifier] = verifier if verifier yardoc.run(*(options + files)) YARD::CLI::Stats.run(*(stats_options + ['--use-cache'])) unless stats_options.empty? after.call if after.is_a?(Proc) end end
def initialize(name = :yard)
- Yieldparam: _self - the task object to allow any parameters
Other tags:
- Yield: - a block to allow any options to be modified on the task
Parameters:
-
name
(String, Symbol
) -- the name of the rake task
def initialize(name = :yard) @name = name @options = [] @stats_options = [] @files = [] yield self if block_given? self.options += ENV['OPTS'].split(/[ ,]/) if ENV['OPTS'] self.files += ENV['FILES'].split(/[ ,]/) if ENV['FILES'] self.options << '--no-stats' unless stats_options.empty? define end