Class: HTMLFormatter
- Inherits:
-
YAMLFormatter
- Object
- BaseFormatter
- ArrayFormatter
- YAMLFormatter
- HTMLFormatter
- Defined in:
- lib/teuton/report/formatter/html_formatter.rb
Instance Method Summary collapse
- #build_page ⇒ Object
-
#initialize(report) ⇒ HTMLFormatter
constructor
A new instance of HTMLFormatter.
- #process ⇒ Object
Methods inherited from ArrayFormatter
#build_data, #build_final_data, #build_history_data, #build_hof_data, #build_initial_data
Methods inherited from BaseFormatter
Constructor Details
#initialize(report) ⇒ HTMLFormatter
Returns a new instance of HTMLFormatter.
8 9 10 11 12 13 |
# File 'lib/teuton/report/formatter/html_formatter.rb', line 8 def initialize(report) super(report) @data = {} filepath = File.join(File.dirname(__FILE__), '..', '..', 'files', 'template', 'case.html') @template = File.read(filepath) end |
Instance Method Details
#build_page ⇒ Object
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/teuton/report/formatter/html_formatter.rb', line 21 def build_page # config = @data[:config] # results = @data[:results] # logs = @data[:logs] # groups = @data[:groups] # hall_of_fame = @data[:hall_of_fame] # version = Application::VERSION render = ERB.new(@template) w render.result(binding) end |
#process ⇒ Object
15 16 17 18 19 |
# File 'lib/teuton/report/formatter/html_formatter.rb', line 15 def process build_data build_page deinit end |