Sha256: 6dfafc724fe491fc3fa7e8893cc67eae638e4e869ae9d19881cb58c326b4367d

Contents?: true

Size: 1.3 KB

Versions: 19

Compression:

Stored size: 1.3 KB

Contents

# frozen_string_literal: true
begin
  gem 'rdoc'
rescue Gem::LoadError
end unless defined?(RDoc)

require 'rdoc/task'

##
# RDoc::RI::Task creates ri data in <code>./.rdoc</code> for your project.
#
# It contains the following tasks:
#
# [ri]
#   Build ri data
#
# [clobber_ri]
#   Delete ri data files.  This target is automatically added to the main
#   clobber target.
#
# [reri]
#   Rebuild the ri data from scratch even if they are not out of date.
#
# Simple example:
#
#   require 'rdoc/ri/task'
#
#   RDoc::RI::Task.new do |ri|
#     ri.main = 'README.rdoc'
#     ri.rdoc_files.include 'README.rdoc', 'lib/**/*.rb'
#   end
#
# For further configuration details see RDoc::Task.

class RDoc::RI::Task < RDoc::Task

  DEFAULT_NAMES = { # :nodoc:
    :clobber_rdoc => :clobber_ri,
    :rdoc         => :ri,
    :rerdoc       => :reri,
  }

  ##
  # Create an ri task with the given name. See RDoc::Task for documentation on
  # setting names.

  def initialize name = DEFAULT_NAMES # :yield: self
    super
  end

  def clobber_task_description # :nodoc:
    "Remove RI data files"
  end

  ##
  # Sets default task values

  def defaults
    super

    @rdoc_dir = '.rdoc'
  end

  def rdoc_task_description # :nodoc:
    'Build RI data files'
  end

  def rerdoc_task_description # :nodoc:
    'Rebuild RI data files'
  end
end

Version data entries

19 entries across 19 versions & 3 rubygems

Version Path
rdoc-6.1.2.1 lib/rdoc/ri/task.rb
rdoc-6.2.1 lib/rdoc/ri/task.rb
honeybadger-4.5.3 vendor/bundle/ruby/2.6.0/gems/rdoc-6.1.1/lib/rdoc/ri/task.rb
rdoc-6.2.0 lib/rdoc/ri/task.rb
rdoc-6.1.2 lib/rdoc/ri/task.rb
rdoc-6.0.1.1 lib/rdoc/ri/task.rb
ric-0.13.0 vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/ri/task.rb
ric-0.12.2 vendor/bundle/ruby/2.5.0/gems/rdoc-6.1.1/lib/rdoc/ri/task.rb
rdoc-6.1.1 lib/rdoc/ri/task.rb
rdoc-6.1.0 lib/rdoc/ri/task.rb
rdoc-6.1.0.beta3 lib/rdoc/ri/task.rb
rdoc-6.1.0.beta2 lib/rdoc/ri/task.rb
rdoc-6.1.0.beta1 lib/rdoc/ri/task.rb
rdoc-6.0.4 lib/rdoc/ri/task.rb
rdoc-6.0.3 lib/rdoc/ri/task.rb
rdoc-6.0.2 lib/rdoc/ri/task.rb
rdoc-6.0.1 lib/rdoc/ri/task.rb
rdoc-6.0.0 lib/rdoc/ri/task.rb
rdoc-6.0.0.beta4 lib/rdoc/ri/task.rb