Sha256: dd0b6ed23b31429c1f0b5ed63d14af8c9757b40da89e02b51432c3d2d03386ab
Contents?: true
Size: 993 Bytes
Versions: 10
Compression:
Stored size: 993 Bytes
Contents
# frozen_string_literal: true require 'erb' require_relative 'yaml_formatter' require_relative '../../application' ## # HTMLFormatter class receive a [Report] and generates HAML output. class HTMLFormatter < YAMLFormatter ## # Class constructor # @param report [Report] Parent object that contains data to be exported. def initialize(report) super(report) @data = {} filepath = File.join(File.dirname(__FILE__), '..', '..', 'files', 'template', 'case.html') @template = File.read(filepath) end ## # Process data from parent object and export it into YAML format. def process build_data build_page deinit end ## # Build html case page def build_page config = @data[:config] results = @data[:results] logs = @data[:logs] groups = @data[:groups] groups = @data[:groups] hall_of_fame = @data[:hall_of_fame] version = Application::VERSION renderer = ERB.new(@template) w renderer.result(binding) end end
Version data entries
10 entries across 10 versions & 1 rubygems