Sha256: cabe6a6952752163ece22bf195321c29707fbdeded330050c2d649eebbab882a

Contents?: true

Size: 481 Bytes

Versions: 1

Compression:

Stored size: 481 Bytes

Contents

# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2021-2024, by Samuel Williams.

require_relative "terminal"
require_relative "serialized"
require_relative "failure"

module Console
	module Output
		module Default
			def self.new(output, **options)
				output ||= $stderr
				
				if output.tty?
					output = Terminal.new(output, **options)
				else
					output = Serialized.new(output, **options)
				end
				
				return output
			end
		end
	end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
console-1.29.0 lib/console/output/default.rb