Sha256: e3fdd7c3e223bb72dd969b74509ce272601fef3f527f3457d925f7fd5a99a6c0
Contents?: true
Size: 611 Bytes
Versions: 12
Compression:
Stored size: 611 Bytes
Contents
# frozen_string_literal: true # Released under the MIT License. # Copyright, 2021-2023, by Samuel Williams. require_relative 'output/default' require_relative 'output/json' require_relative 'output/text' require_relative 'output/xterm' require_relative 'output/null' module Console module Output def self.new(output = nil, env = ENV, **options) if names = env['CONSOLE_OUTPUT'] names = names.split(',').reverse names.inject(output) do |output, name| Output.const_get(name).new(output, **options) end else return Output::Default.new(output, **options) end end end end
Version data entries
12 entries across 12 versions & 1 rubygems