Class: Detroit::Qedoc
- Inherits:
-
Tool
- Object
- Tool
- Detroit::Qedoc
- Defined in:
- lib/detroit-qedoc.rb
Overview
QED documentation tool.
QED can generate an HTML representation of the QED documents.
Instance Attribute Summary collapse
-
#files ⇒ Object
Demonstration files (or globs).
-
#output ⇒ Object
Output file(s) to generate QEDocs.
-
#stylesheet ⇒ Object
Relative reference to css stylesheet for QEDocs.
-
#title ⇒ Object
Optional title to use in QEDdocs.
Class Method Summary collapse
Instance Method Summary collapse
- #assemble(station, options = {}) ⇒ Object
- #assemble?(station, options = {}) ⇒ Boolean
-
#clean ⇒ Object
noop.
- #document ⇒ Object
-
#purge ⇒ Object
Remove qedoc output directory.
-
#reset ⇒ Object
Mark the output directory as out of date.
Instance Attribute Details
#files ⇒ Object
Demonstration files (or globs).
18 19 20 |
# File 'lib/detroit-qedoc.rb', line 18 def files @files end |
#output ⇒ Object
Output file(s) to generate QEDocs.
28 29 30 |
# File 'lib/detroit-qedoc.rb', line 28 def output @output end |
#stylesheet ⇒ Object
Relative reference to css stylesheet for QEDocs. (Only useful to HTML format.)
22 23 24 |
# File 'lib/detroit-qedoc.rb', line 22 def stylesheet @stylesheet end |
#title ⇒ Object
Optional title to use in QEDdocs.
25 26 27 |
# File 'lib/detroit-qedoc.rb', line 25 def title @title end |
Class Method Details
.man_page ⇒ Object
125 126 127 |
# File 'lib/detroit-qedoc.rb', line 125 def self.man_page File.dirname(__FILE__)+'/../man/detroit-qedoc.5' end |
Instance Method Details
#assemble(station, options = {}) ⇒ Object
55 56 57 58 59 60 61 62 |
# File 'lib/detroit-qedoc.rb', line 55 def assemble(station, ={}) case station when :document then document when :reset then reset when :clean then clean when :purge then purge end end |
#assemble?(station, options = {}) ⇒ Boolean
45 46 47 48 49 50 51 52 |
# File 'lib/detroit-qedoc.rb', line 45 def assemble?(station, ={}) case station when :document then true when :reset then true when :clean then true when :purge then true end end |
#clean ⇒ Object
noop
93 94 |
# File 'lib/detroit-qedoc.rb', line 93 def clean end |
#document ⇒ Object
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/detroit-qedoc.rb', line 68 def document = {} [:paths] = files [:css] = stylesheet [:title] = title [:dryrun] = dryrun? [:quiet] = quiet? output_files.each do |f| [:output] = f doc = QED::Document.new() doc.generate end end |
#purge ⇒ Object
Remove qedoc output directory.
97 98 99 100 101 102 |
# File 'lib/detroit-qedoc.rb', line 97 def purge if directory?(output) rm_r(output) status "Removed #{output}" unless trial? end end |
#reset ⇒ Object
Mark the output directory as out of date.
85 86 87 88 89 90 |
# File 'lib/detroit-qedoc.rb', line 85 def reset if directory?(output) utime(0, 0, output) report "Reset #{output}" #unless trial? end end |