6
7
8
9
10
11
12
13
14
15
16
17
18
|
# File 'lib/predictability_engine/report/text_renderer.rb', line 6
def self.render(report, fmt, color: false, layout: :standard, **)
config = Constants::FORMAT_CONFIG[fmt]
= config[:h1].call(report.title)
if layout.to_sym == :landscape
return [, '',
render_landscape(report, fmt, color: color, **)].join("\n")
end
[, SummaryVisualizer.render(report.items, fmt, color: color, percentiles: report.percentiles),
*Constants::CHART_CONFIG.map do |id, cfg|
render_section(report, id, cfg, fmt, color: color, **)
end].join("\n")
end
|