Class: ClosingComments::Processor::Reporter

Inherits:
ClosingComments::Processor show all
Defined in:
lib/closing_comments/processor.rb

Direct Known Subclasses

Fixer

Instance Method Summary collapse

Methods inherited from ClosingComments::Processor

#initialize, #process, #success?

Constructor Details

This class inherits a constructor from ClosingComments::Processor

Instance Method Details

#handle(source) ⇒ Object



25
26
27
# File 'lib/closing_comments/processor.rb', line 25

def handle(source)
  print source.problematic? ? 'F'.red : '.'.green
end

#reportObject



29
30
31
32
33
34
# File 'lib/closing_comments/processor.rb', line 29

def report
  puts("\n\n")
  return puts 'All good!'.green if reportables.empty?
  puts "Problems #{action} in #{reportables.count} files:\n".red
  reportables.each(&method(:report_file))
end