class ClosingComments::Processor::Reporter
Public Instance Methods
handle(source)
click to toggle source
# File lib/closing_comments/processor.rb, line 25 def handle(source) print source.problematic? ? 'F'.red : '.'.green end
report()
click to toggle source
# 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
Private Instance Methods
action()
click to toggle source
# File lib/closing_comments/processor.rb, line 38 def action 'found' end
report_file(path, source)
click to toggle source
# File lib/closing_comments/processor.rb, line 42 def report_file(path, source) puts "#{path}:" source.problems.sort_by(&:line).each do |problem| puts " #{problem.line}:#{problem.column} #{problem.message}" end puts('') end