Class: Rake::Leaves::HeaderDocTask
- Defined in:
- lib/leaves/doc/headerdoc.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
-
#files ⇒ Object
Returns the value of attribute files.
-
#output ⇒ Object
Returns the value of attribute output.
Instance Method Summary collapse
- #define ⇒ Object
-
#initialize {|_self| ... } ⇒ HeaderDocTask
constructor
A new instance of HeaderDocTask.
Methods inherited from TaskLib
Constructor Details
#initialize {|_self| ... } ⇒ HeaderDocTask
Returns a new instance of HeaderDocTask.
14 15 16 17 18 19 20 |
# File 'lib/leaves/doc/headerdoc.rb', line 14 def initialize() @files = Rake::FileList.new('./include') @output = './doc' yield self if block_given? define end |
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
12 13 14 |
# File 'lib/leaves/doc/headerdoc.rb', line 12 def config @config end |
#files ⇒ Object
Returns the value of attribute files.
10 11 12 |
# File 'lib/leaves/doc/headerdoc.rb', line 10 def files @files end |
#output ⇒ Object
Returns the value of attribute output.
11 12 13 |
# File 'lib/leaves/doc/headerdoc.rb', line 11 def output @output end |
Instance Method Details
#define ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/leaves/doc/headerdoc.rb', line 22 def define desc "Generate documentation using HeaderDoc." task :doc do @files.each do |file| cmd = "headerdoc2html" cmd << " -c #{@config}" if @config cmd << " -o #{@output} #{file}" sh cmd end sh "gatherheaderdoc #{@output}" end task :clobber_doc do rm_r @output rescue nil end task :clobber => [:clobber_doc] self end |