Class: Ucode::Audit::Formatters::LibrarySummaryText

Inherits:
Object
  • Object
show all
Defined in:
lib/ucode/audit/formatters/library_summary_text.rb

Overview

Human-readable overview of a Models::Audit::LibrarySummary.

Lists the per-face rollup counts, aggregate metrics, script coverage matrix, duplicate groups, and license distribution. The full per-face AuditReports are attached to the model; this view only shows the cross-face summaries (use YAML/JSON output for the full per-face data).

Constant Summary collapse

SEPARATOR =
"=" * 80
LIST_LIMIT =
15

Instance Method Summary collapse

Constructor Details

#initialize(summary) ⇒ LibrarySummaryText

Returns a new instance of LibrarySummaryText.

Parameters:



18
19
20
21
22
# File 'lib/ucode/audit/formatters/library_summary_text.rb', line 18

def initialize(summary)
  @summary = summary
  @lines = []
  @helper = TextFormatter.new
end

Instance Method Details

#renderString

Returns:

  • (String)


25
26
27
28
29
30
31
32
# File 'lib/ucode/audit/formatters/library_summary_text.rb', line 25

def render
  render_header
  render_aggregates
  render_script_coverage
  render_duplicates
  render_license_distribution
  @lines.join("\n")
end