Sha256: f3add70f6869dc0dc01b14ad6becfbff5900af611edd8d2e673f289a9e4c89ea

Contents?: true

Size: 395 Bytes

Versions: 20

Compression:

Stored size: 395 Bytes

Contents

# frozen_string_literal: true

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

require_relative 'xterm'
require_relative 'json'

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

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
console-1.24.0 lib/console/output/default.rb
console-1.23.7 lib/console/output/default.rb
console-1.23.6 lib/console/output/default.rb
console-1.23.5 lib/console/output/default.rb
console-1.23.4 lib/console/output/default.rb
console-1.23.3 lib/console/output/default.rb
console-1.23.2 lib/console/output/default.rb
console-1.23.1 lib/console/output/default.rb
console-1.23.0 lib/console/output/default.rb
console-1.22.0 lib/console/output/default.rb
console-1.21.0 lib/console/output/default.rb
console-1.20.0 lib/console/output/default.rb
console-1.19.0 lib/console/output/default.rb
console-1.18.0 lib/console/output/default.rb
console-1.17.4 lib/console/output/default.rb
console-1.17.3 lib/console/output/default.rb
console-1.17.2 lib/console/output/default.rb
console-1.17.1 lib/console/output/default.rb
console-1.17.0 lib/console/output/default.rb
console-1.16.2 lib/console/output/default.rb