Sha256: 7faade39751263fe5f1faa00bce4d139411ae38c17a49615271c54e5b21d400b
Contents?: true
Size: 948 Bytes
Versions: 21
Compression:
Stored size: 948 Bytes
Contents
# frozen_string_literal: true require_relative 'base_formatter' # ArrayFormatter class: format report data into an array class ResumeArrayFormatter < BaseFormatter def initialize(report) super(report) @data = {} end def process build_data w @data.to_s # Write data into ouput file deinit end def build_data build_initial_data build_cases_data build_final_data build_hof_data end def build_initial_data head = {} @head.each { |key, value| head[key] = value } @data[:config] = head end def build_cases_data @data[:cases] = @lines end def build_final_data tail = {} @tail.each { |key, value| tail[key] = value } @data[:results] = tail end def build_hof_data app = Application.instance fame = {} if app.options[:case_number] > 2 app.hall_of_fame.each { |line| fame[line[0]] = line[1] } end @data[:hall_of_fame] = fame end end
Version data entries
21 entries across 21 versions & 1 rubygems