Class: MetzScan::Commands::Scan::TextRenderer

Inherits:
Object
  • Object
show all
Defined in:
lib/metz_scan/commands/scan/text_renderer.rb

Constant Summary collapse

ANSI_RESET =
"\e[0m"
ANSI_BOLD =
"\e[1m"
ANSI_CYAN =
"\e[36m"

Instance Method Summary collapse

Constructor Details

#initialize(stdout, parsed) ⇒ TextRenderer

Returns a new instance of TextRenderer.



18
19
20
21
# File 'lib/metz_scan/commands/scan/text_renderer.rb', line 18

def initialize(stdout, parsed)
  @stdout = stdout
  @parsed = parsed
end

Instance Method Details

#renderObject



23
24
25
26
27
28
29
# File 'lib/metz_scan/commands/scan/text_renderer.rb', line 23

def render
  emit_project_analyzer_summary
  sorted_offense_blocks.each do |cop_name, list|
    render_block(cop_name, list)
  end
  ComplianceScorecard.new(parsed).lines.each { |line| stdout.puts line }
end