diff --git a/lib/yard/rake/yardoc_task.rb b/lib/yard/rake/yardoc_task.rb index a1597f5f9..136df2a4f 100644 --- a/lib/yard/rake/yardoc_task.rb +++ b/lib/yard/rake/yardoc_task.rb @@ -68,6 +68,8 @@ def initialize(name = :yard) def define desc "Generate YARD Documentation" unless ::Rake.application.last_description task(name) do + require File.expand_path('../../yard', __dir__) + before.call if before.is_a?(Proc) yardoc = YARD::CLI::Yardoc.new yardoc.options[:verifier] = verifier if verifier