Method: YARD::Rake::YardocTask#define

Defined in:
lib/yard/rake/yardoc_task.rb

#definevoid (protected)

This method returns an undefined value.

Defines the rake task



68
69
70
71
72
73
74
75
76
77
78
# File 'lib/yard/rake/yardoc_task.rb', line 68

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