Module: TurnipFormatter
- Defined in:
- lib/turnip_formatter.rb,
lib/turnip_formatter/version.rb,
lib/turnip_formatter/template.rb,
lib/turnip_formatter/renderer/html.rb,
lib/turnip_formatter/renderer/html/base.rb,
lib/turnip_formatter/renderer/html/step.rb,
lib/turnip_formatter/resource/step/hook.rb,
lib/turnip_formatter/resource/step/step.rb,
lib/turnip_formatter/step_template/base.rb,
lib/turnip_formatter/renderer/html/index.rb,
lib/turnip_formatter/renderer/html/scenario.rb,
lib/turnip_formatter/resource/scenario/base.rb,
lib/turnip_formatter/resource/scenario/pass.rb,
lib/turnip_formatter/step_template/exception.rb,
lib/turnip_formatter/renderer/html/data_table.rb,
lib/turnip_formatter/renderer/html/doc_string.rb,
lib/turnip_formatter/resource/scenario/failure.rb,
lib/turnip_formatter/resource/scenario/pending.rb,
lib/turnip_formatter/renderer/html/runtime_error.rb,
lib/turnip_formatter/renderer/html/statistics_tag.rb,
lib/turnip_formatter/resource/step/failure_result.rb,
lib/turnip_formatter/resource/step/pending_result.rb,
lib/turnip_formatter/renderer/html/statistics_speed.rb,
lib/turnip_formatter/renderer/html/statistics_feature.rb
Defined Under Namespace
Modules: Renderer, Resource, StepTemplate
Classes: Template
Constant Summary
collapse
- VERSION =
'0.6.0'
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.title ⇒ Object
Returns the value of attribute title.
7
8
9
|
# File 'lib/turnip_formatter.rb', line 7
def title
@title
end
|
Class Method Details
.add_javascript(scripts) ⇒ Object
29
30
31
32
33
34
35
|
# File 'lib/turnip_formatter.rb', line 29
def add_javascript(scripts)
scripts = [scripts] if scripts.is_a? String
scripts.each do |s|
TurnipFormatter::Renderer::Html.add_javascript(s)
end
end
|
.add_stylesheet(stylesheets) ⇒ Object
21
22
23
24
25
26
27
|
# File 'lib/turnip_formatter.rb', line 21
def add_stylesheet(stylesheets)
stylesheets = [stylesheets] if stylesheets.is_a? String
stylesheets.each do |s|
TurnipFormatter::Renderer::Html.add_stylesheet(s)
end
end
|
.configuration ⇒ Object
41
42
43
|
# File 'lib/turnip_formatter.rb', line 41
def configuration
self
end
|
37
38
39
|
# File 'lib/turnip_formatter.rb', line 37
def configure
yield self
end
|
.step_templates ⇒ Object
9
10
11
|
# File 'lib/turnip_formatter.rb', line 9
def step_templates
@step_templates ||= []
end
|
.step_templates_for(status) ⇒ Object
13
14
15
16
17
18
19
|
# File 'lib/turnip_formatter.rb', line 13
def step_templates_for(status)
step_templates.reduce([]) do |templates, t|
hooks = t.class.hooks
return templates unless hooks.key?(status)
templates + [t].product(hooks[status])
end
end
|