Sha256: 82411dec040cee986f7a88f1b36d779202f314314c30baf87447f6d4c01e3d83
Contents?: true
Size: 454 Bytes
Versions: 17
Compression:
Stored size: 454 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 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
17 entries across 17 versions & 2 rubygems