Class: Fdlint::Printer::NoColorPrinter

Inherits:
BasePrinter show all
Defined in:
lib/fdlint/printer/nocolor_printer.rb

Instance Attribute Summary

Attributes inherited from BasePrinter

#file, #results, #source

Instance Method Summary collapse

Methods inherited from BasePrinter

#initialize, #post_validate, #pre_validate

Constructor Details

This class inherits a constructor from Fdlint::Printer::BasePrinter

Instance Method Details



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/fdlint/printer/nocolor_printer.rb', line 7

def print( file, source, results )

  super

  if results.empty?
    puts "[OK] #{file}"
  else
    prf = @opt[:prefix]
    suf = @opt[:suffix]
    out = @opt[:out]

    puts "[EE] #{file}"

    results.each do |r|
      puts "#{prf}#{r}#{suf}"
    end
  end
end