Class: ClosingComments::Processor::Reporter
- Inherits:
-
ClosingComments::Processor
- Object
- ClosingComments::Processor
- ClosingComments::Processor::Reporter
- Defined in:
- lib/closing_comments/processor.rb
Direct Known Subclasses
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 |
#report ⇒ Object
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 |