Sha256: be5183732476a5a689265e14f6e6365e7ad724502b6ecc5e124f4d3e0a392b12

Contents?: true

Size: 501 Bytes

Versions: 16

Compression:

Stored size: 501 Bytes

Contents

require "erb"
require_relative "yaml"

class HTMLFormatter < YAMLFormatter
  def initialize(report)
    super(report)
    @ext = "html"
    @data = {}
    basedir = File.join(File.dirname(__FILE__), "..", "..", "..")
    filepath = File.join(basedir, "files", "template", "case.html")
    @template = File.read(filepath)
  end

  def process(options = {})
    build_data(options)
    build_page
    deinit
  end

  def build_page
    render = ERB.new(@template)
    w render.result(binding)
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
teuton-2.9.2 lib/teuton/report/formatter/default/html.rb
teuton-2.9.1 lib/teuton/report/formatter/default/html.rb
teuton-2.9.0 lib/teuton/report/formatter/default/html.rb
teuton-2.8.0 lib/teuton/report/formatter/default/html.rb
teuton-2.7.3 lib/teuton/report/formatter/default/html.rb
teuton-2.7.2 lib/teuton/report/formatter/default/html.rb
teuton-2.7.1 lib/teuton/report/formatter/default/html.rb
teuton-2.7.0 lib/teuton/report/formatter/default/html.rb
teuton-2.6.0 lib/teuton/report/formatter/default/html.rb
teuton-2.5.0 lib/teuton/report/formatter/default/html.rb
teuton-2.4.5 lib/teuton/report/formatter/default/html.rb
teuton-2.4.4 lib/teuton/report/formatter/default/html.rb
teuton-2.4.3 lib/teuton/report/formatter/default/html.rb
teuton-2.4.2 lib/teuton/report/formatter/default/html.rb
teuton-2.4.1 lib/teuton/report/formatter/default/html.rb
teuton-2.4.0 lib/teuton/report/formatter/default/html.rb