Class: ResumeHTMLFormatter
- Inherits:
-
ResumeYAMLFormatter
- Object
- BaseFormatter
- ResumeArrayFormatter
- ResumeYAMLFormatter
- ResumeHTMLFormatter
- Defined in:
- lib/teuton/report/formatter/resume_html_formatter.rb
Overview
HTMLFormatter class receive a [Report] and generates HAML output.
Instance Method Summary collapse
-
#build_page ⇒ Object
Build html case page.
-
#initialize(report) ⇒ ResumeHTMLFormatter
constructor
Class constructor.
-
#process ⇒ Object
Process data from parent object and export it into YAML format.
Methods inherited from ResumeArrayFormatter
#build_cases_data, #build_data, #build_final_data, #build_hof_data, #build_initial_data
Methods inherited from BaseFormatter
Constructor Details
#initialize(report) ⇒ ResumeHTMLFormatter
Class constructor
13 14 15 16 17 18 |
# File 'lib/teuton/report/formatter/resume_html_formatter.rb', line 13 def initialize(report) super(report) @data = {} filepath = File.join(File.dirname(__FILE__), '..', '..', 'files', 'template', 'resume.html') @template = File.read(filepath) end |
Instance Method Details
#build_page ⇒ Object
Build html case page
30 31 32 33 34 35 36 37 38 |
# File 'lib/teuton/report/formatter/resume_html_formatter.rb', line 30 def build_page config = @data[:config] cases = @data[:cases] results = @data[:results] hall_of_fame = @data[:hall_of_fame] version = Application::VERSION renderer = ERB.new(@template) w renderer.result(binding) end |
#process ⇒ Object
Process data from parent object and export it into YAML format.
22 23 24 25 26 |
# File 'lib/teuton/report/formatter/resume_html_formatter.rb', line 22 def process build_data build_page deinit end |