Module: Moku6::Reporter::Text

Defined in:
lib/moku6/reporter.rb

Class Method Summary collapse

Class Method Details

.report(result) ⇒ Object

: (Result result) -> void



17
18
19
20
21
22
23
24
25
# File 'lib/moku6/reporter.rb', line 17

def self.report(result)
  result.offenses.each do |o|
    tag = (o.severity == :error) ? "ERROR" : "WARN "
    puts "#{tag}  #{o.file}  #{o.action}  #{o.message}"
  end
  e = result.errors.size
  w = result.warnings.size
  puts "\n#{e} error#{"s" if e != 1}, #{w} warning#{"s" if w != 1}"
end