Class: RDoc::RI::Task

Inherits:
Task
  • Object
show all
Defined in:
lib/rdoc/ri/task.rb

Overview

RDoc::RI::Task creates ri data in ./.rdoc 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.

Constant Summary collapse

DEFAULT_NAMES =

:nodoc:

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

Instance Attribute Summary

Attributes inherited from Task

#external, #generator, #main, #markup, #name, #options, #rdoc_dir, #rdoc_files, #template, #title

Instance Method Summary collapse

Methods inherited from Task

#before_running_rdoc, #check_names, #define, #inline_source, #inline_source=, #option_list

Constructor Details

#initialize(name = DEFAULT_NAMES) ⇒ Task

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



47
48
49
# File 'lib/rdoc/ri/task.rb', line 47

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

Instance Method Details

#clobber_task_descriptionObject

:nodoc:



51
52
53
# File 'lib/rdoc/ri/task.rb', line 51

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

#defaultsObject

Sets default task values



58
59
60
61
62
# File 'lib/rdoc/ri/task.rb', line 58

def defaults
  super

  @rdoc_dir = '.rdoc'
end

#rdoc_task_descriptionObject

:nodoc:



64
65
66
# File 'lib/rdoc/ri/task.rb', line 64

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

#rerdoc_task_descriptionObject

:nodoc:



68
69
70
# File 'lib/rdoc/ri/task.rb', line 68

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