diff --git a/Rakefile b/Rakefile index baef3fa20..fccd9d226 100644 --- a/Rakefile +++ b/Rakefile @@ -8,12 +8,15 @@ task :test => :spec task :default => :spec namespace :doc do - require 'yard' - YARD::Rake::YardocTask.new do |task| - task.files = ['README.md', 'LICENSE.md', 'lib/**/*.rb'] - task.options = [ - '--output-dir', 'doc/yard', - '--markup', 'markdown', - ] + begin + require 'yard' + YARD::Rake::YardocTask.new do |task| + task.files = ['README.md', 'LICENSE.md', 'lib/**/*.rb'] + task.options = [ + '--output-dir', 'doc/yard', + '--markup', 'markdown', + ] + end + rescue LoadError end end