Method: YARD::Rake::YardocTask#initialize

Defined in:
lib/yard/rake/yardoc_task.rb

#initialize(name = :yard) {|_self| ... } ⇒ YardocTask

Creates a new task with name name.

Parameters:

  • name (String, Symbol) (defaults to: :yard)

    the name of the rake task

Yields:

  • a block to allow any options to be modified on the task

Yield Parameters:

  • _self (YardocTask)

    the task object to allow any parameters to be changed.


46
47
48
49
50
51
52
53
54
55
56
# File 'lib/yard/rake/yardoc_task.rb', line 46

def initialize(name = :yard)
  @name = name
  @options = []
  @files = []

  yield self if block_given?
  self.options +=  ENV['OPTS'].split(/[ ,]/) if ENV['OPTS']
  self.files   += ENV['FILES'].split(/[ ,]/) if ENV['FILES']

  define
end