class XCPerfect::Printer

Printer handles the initialization of the output formatter and is directly called by the main `xcperfect` file during execution

Attributes

formatter[R]

Public Class Methods

new(params, json) click to toggle source
# File lib/xcperfect/printer.rb, line 7
def initialize(params, json)
  klass = params[:formatter]
  @formatter = klass.new(params[:ascii], params[:colorize], json)
end

Public Instance Methods

pretty_print(targets) click to toggle source
# File lib/xcperfect/printer.rb, line 12
def pretty_print(targets)
  formatted_text = formatter.pretty_format(targets)
  STDOUT.print(formatted_text + "\n")
  STDOUT.flush
end