Class: Detroit::Qedoc

Inherits:
Tool
  • Object
show all
Defined in:
lib/detroit-qedoc.rb

Overview

QED documentation tool.

QED can generate an HTML representation of the QED documents.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#filesObject

Demonstration files (or globs).



18
19
20
# File 'lib/detroit-qedoc.rb', line 18

def files
  @files
end

#outputObject

Output file(s) to generate QEDocs.



28
29
30
# File 'lib/detroit-qedoc.rb', line 28

def output
  @output
end

#stylesheetObject

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

#titleObject

Optional title to use in QEDdocs.



25
26
27
# File 'lib/detroit-qedoc.rb', line 25

def title
  @title
end

Class Method Details

.man_pageObject



123
124
125
# File 'lib/detroit-qedoc.rb', line 123

def self.man_page
  File.dirname(__FILE__)+'/../man/detroit-qedoc.5'  
end

Instance Method Details

#cleanObject

noop



91
92
# File 'lib/detroit-qedoc.rb', line 91

def clean
end

#documentObject



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# File 'lib/detroit-qedoc.rb', line 66

def document
  options = {}
  options[:paths]  = files
  options[:css]    = stylesheet
  options[:title]  = title
  options[:dryrun] = dryrun?
  options[:quiet]  = quiet?

  output_files.each do |f|
    options[:output] = f

    doc = QED::Document.new(options)
    doc.generate
  end
end

#purgeObject

Remove qedoc output directory.



95
96
97
98
99
100
# File 'lib/detroit-qedoc.rb', line 95

def purge
  if directory?(output)
    rm_r(output)
    status "Removed #{output}" unless trial?
  end
end

#resetObject

Mark the output directory as out of date.



83
84
85
86
87
88
# File 'lib/detroit-qedoc.rb', line 83

def reset
  if directory?(output)
    utime(0, 0, output)
    report "Reset #{output}" #unless trial?
  end
end

#station_cleanObject



54
55
56
# File 'lib/detroit-qedoc.rb', line 54

def station_clean
  clean
end

#station_documentObject



44
45
46
# File 'lib/detroit-qedoc.rb', line 44

def station_document
  document
end

#station_purgeObject



59
60
61
# File 'lib/detroit-qedoc.rb', line 59

def station_purge
  purge
end

#station_resetObject



49
50
51
# File 'lib/detroit-qedoc.rb', line 49

def station_reset
  reset
end