Class: HTMLFormatter
Instance Attribute Summary
#ext
Instance Method Summary
collapse
#build_data
#deinit, #init, #trim, #w
Constructor Details
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(options = {})
build_data(options)
build_page
deinit
end
|