Class: EY::LoggedOutput::Tee

Inherits:
Object
  • Object
show all
Defined in:
lib/engineyard-serverside/logged_output.rb

Instance Method Summary collapse

Constructor Details

#initialize(*streams) ⇒ Tee

Returns a new instance of Tee.



7
8
9
# File 'lib/engineyard-serverside/logged_output.rb', line 7

def initialize(*streams)
  @streams = streams.flatten
end

Instance Method Details

#<<(output) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/engineyard-serverside/logged_output.rb', line 11

def <<(output)
  @streams.each do |s|
    s << output
    s.flush
  end
  self
end