Sha256: dd358d7ae22db08415e4500e394e00791283ca5a11205e5be5490c80bca1c0bf
Contents?: true
Size: 414 Bytes
Versions: 15
Compression:
Stored size: 414 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) STDOUT.print(formatted_text + formatter.optional_newline) unless formatted_text.empty? end end end
Version data entries
15 entries across 15 versions & 2 rubygems