Class: Console::Split

Inherits:
Object
  • Object
show all
Defined in:
lib/console/split.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(outputs) ⇒ Split

Returns a new instance of Split.


28
29
30
# File 'lib/console/split.rb', line 28

def initialize(outputs)
	@outputs = outputs
end

Class Method Details

.[](*outputs) ⇒ Object


24
25
26
# File 'lib/console/split.rb', line 24

def self.[] *outputs
	self.new(outputs)
end

Instance Method Details

#call(level, subject = nil, *arguments, **options, &block) ⇒ Object


36
37
38
39
40
# File 'lib/console/split.rb', line 36

def call(level, subject = nil, *arguments, **options, &block)
	@outputs.each do |output|
		output.call(level, subject, *arguments, **options, &block)
	end
end

#verbose!(value = true) ⇒ Object


32
33
34
# File 'lib/console/split.rb', line 32

def verbose!(value = true)
	@outputs.each{|output| output.verbose!(value)}
end