begin
  require 'yard'

  YARD::Rake::YardocTask.new do |t|
    t.files   = ['lib/**/*.rb']
    t.options = ['--private', '--protected', '--readme',  'README.rdoc']
  end
rescue LoadError
end

begin
  require 'yard'

  YARD::Rake::YardocTask.new do |t|
    t.files   = ['lib/**/*.rb']
    t.options = ['--private', '--protected', '--readme',  'README.md']
  end
rescue LoadError
end

Load correct README in Yard
Load correct README in Yard
