Class: Docu::Rake::Task

Inherits:
Rake::TaskLib
  • Object
show all
Includes:
Rake::DSL
Defined in:
lib/docu/rake/task.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) {|_self| ... } ⇒ Task

Returns a new instance of Task.

Yields:

  • (_self)

Yield Parameters:



14
15
16
17
18
19
20
21
# File 'lib/docu/rake/task.rb', line 14

def initialize(*args)
  @name = args.shift || :docu
  desc "Execute examples in documentation"  unless ::Rake.application.last_comment
  yield self if block_given?
  task name do
    ExecutesExamples.new.execute(file)
  end
end

Instance Attribute Details

#fileObject

Returns the value of attribute file.



12
13
14
# File 'lib/docu/rake/task.rb', line 12

def file
  @file
end

#nameObject

Returns the value of attribute name.



12
13
14
# File 'lib/docu/rake/task.rb', line 12

def name
  @name
end