Class: WhyClasses::Formatters::ProgressFormatter

Inherits:
BaseFormatter show all
Defined in:
lib/why_classes/formatters/progress_formatter.rb

Overview

The default human-readable formatter: one block per offense with its suggestion, then a summary line.

Instance Method Summary collapse

Methods inherited from BaseFormatter

#initialize

Constructor Details

This class inherits a constructor from WhyClasses::Formatters::BaseFormatter

Instance Method Details

#call(reports) ⇒ Object



10
11
12
13
14
15
# File 'lib/why_classes/formatters/progress_formatter.rb', line 10

def call(reports)
  reports.each do |report|
    report.offenses.each { |offense| print_offense(report, offense) }
  end
  print_summary(reports)
end