Class: Docu::Rake::Task
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- Docu::Rake::Task
- Includes:
- Rake::DSL
- Defined in:
- lib/docu/rake/task.rb
Instance Attribute Summary collapse
-
#file ⇒ Object
Returns the value of attribute file.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(*args) {|_self| ... } ⇒ Task
constructor
A new instance of Task.
Constructor Details
#initialize(*args) {|_self| ... } ⇒ Task
Returns a new instance of Task.
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
#file ⇒ Object
Returns the value of attribute file.
12 13 14 |
# File 'lib/docu/rake/task.rb', line 12 def file @file end |
#name ⇒ Object
Returns the value of attribute name.
12 13 14 |
# File 'lib/docu/rake/task.rb', line 12 def name @name end |