Sha256: a4dc84e472924d81f3294fe82a47090e38ce317bbe443a1e3edb59c6f2387656
Contents?: true
Size: 502 Bytes
Versions: 9
Compression:
Stored size: 502 Bytes
Contents
require "xcpretty/ansi" module XCPretty class Printer attr_reader :formatter def initialize(params) klass = params[:formatter] @formatter = klass.new(params[:unicode], params[:colorize]) end def finish @formatter.finish end def pretty_print(text) formatted_text = formatter.pretty_format(text) unless formatted_text.empty? STDOUT.print(formatted_text + formatter.optional_newline) STDOUT.flush end end end end
Version data entries
9 entries across 9 versions & 2 rubygems