Method: Nukumber::Reporter::Html#initialize

Defined in:
lib/nukumber/reporter/html.rb

#initialize(out) ⇒ Html

Returns a new instance of Html.



31
32
33
34
35
36
37
38
39
40
# File 'lib/nukumber/reporter/html.rb', line 31

def initialize(out)
  @outstream = out
  @doc = Nokogiri::HTML::Document.new
  @html = node("html", @doc)
  node_head = node("head", @html)
  node_style = node("style", node_head, {:type => 'text/css'})
  node_style.inner_html = css
  node_body = node("body", @html)
  node("h1", node_body, {}, 'Nukumber test report')
end