Class: XRay::NoColorPrinter

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

Instance Method Summary collapse

Methods inherited from BasePrinter

#initialize

Constructor Details

This class inherits a constructor from XRay::BasePrinter

Instance Method Details



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

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

    puts "[EE] #{@opt[:file]}"

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