Class: HTMLFormatter
- Inherits:
-
YAMLFormatter
- Object
- BaseFormatter
- ArrayFormatter
- YAMLFormatter
- HTMLFormatter
- Defined in:
- lib/teuton/report/formatter/default/html.rb
Constant Summary
Constants inherited from ArrayFormatter
ArrayFormatter::MIN_HALL_OF_FAME
Instance Attribute Summary
Attributes inherited from BaseFormatter
Instance Method Summary collapse
- #build_page ⇒ Object
-
#initialize(report) ⇒ HTMLFormatter
constructor
A new instance of HTMLFormatter.
- #process(options = {}) ⇒ Object
Methods inherited from ArrayFormatter
Methods inherited from BaseFormatter
Constructor Details
#initialize(report) ⇒ HTMLFormatter
Returns a new instance of HTMLFormatter.
5 6 7 8 9 10 11 12 |
# File 'lib/teuton/report/formatter/default/html.rb', line 5 def initialize(report) super @ext = "html" @data = {} basedir = File.join(File.dirname(__FILE__), "..", "..", "..") filepath = File.join(basedir, "files", "template", "case.html") @template = File.read(filepath) end |
Instance Method Details
#build_page ⇒ Object
20 21 22 23 |
# File 'lib/teuton/report/formatter/default/html.rb', line 20 def build_page render = ERB.new(@template) w render.result(binding) end |
#process(options = {}) ⇒ Object
14 15 16 17 18 |
# File 'lib/teuton/report/formatter/default/html.rb', line 14 def process( = {}) build_data() build_page deinit end |