Sha256: 8221a3d7cf1cdc657affdabe46bebfb3debb7420c25ba5b79834fe2e788b959e

Contents?: true

Size: 554 Bytes

Versions: 8

Compression:

Stored size: 554 Bytes

Contents

# frozen_string_literal: true

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

module Console
	module Output
		class Split
			def self.[](*outputs)
				self.new(outputs)
			end
			
			def initialize(outputs)
				@outputs = outputs
			end
			
			def verbose!(value = true)
				@outputs.each{|output| output.verbose!(value)}
			end
			
			def call(level, subject = nil, *arguments, **options, &block)
				@outputs.each do |output|
					output.call(level, subject, *arguments, **options, &block)
				end
			end
		end
	end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
console-1.19.0 lib/console/output/split.rb
console-1.18.0 lib/console/output/split.rb
console-1.17.4 lib/console/output/split.rb
console-1.17.3 lib/console/output/split.rb
console-1.17.2 lib/console/output/split.rb
console-1.17.1 lib/console/output/split.rb
console-1.17.0 lib/console/output/split.rb
console-1.16.2 lib/console/output/split.rb