Class: Diecut::TemplateListBuilder
Instance Attribute Summary
#mill
Instance Method Summary
collapse
all_kinds, #build_report, #each_default, #each_option, #each_plugin, #each_template, #go, #initialize, #other_advice, #other_summary, #pass_advice, #pass_summary, register, #report, #review, #strict_sequence?, #unindent
Instance Method Details
#collect ⇒ Object
15
16
17
18
19
|
# File 'lib/diecut/report-builders/template-list.rb', line 15
def collect
each_template do |name, template|
report.add(template.path)
end
end
|
#fail_advice ⇒ Object
29
30
31
32
33
34
35
36
|
# File 'lib/diecut/report-builders/template-list.rb', line 29
def fail_advice
(<<-EOA)
No plugin provides any templates. This is probably simple misconfiguration a plugin, or an important plugin has been omitted.
Plugins: #{mill.mediator.activated_plugins.map(&:name)}
Plugin template paths: #{mill.valise.to_s}
EOA
end
|
#fail_summary ⇒ Object
25
26
27
|
# File 'lib/diecut/report-builders/template-list.rb', line 25
def fail_summary
report.summary = "No templates will render"
end
|
#report_fields ⇒ Object
11
12
13
|
# File 'lib/diecut/report-builders/template-list.rb', line 11
def report_fields
["Template path"]
end
|
#report_name ⇒ Object
7
8
9
|
# File 'lib/diecut/report-builders/template-list.rb', line 7
def report_name
"Templates included"
end
|
#report_status ⇒ Object
21
22
23
|
# File 'lib/diecut/report-builders/template-list.rb', line 21
def report_status
report.empty? ? 'FAIL' : 'OK'
end
|