Class: Builderator::Util::Shell::BufferTee

Inherits:
StringIO
  • Object
show all
Defined in:
lib/builderator/util/shell.rb

Overview

Buffer an IO stream and forward to another IO instance

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(out, *args) ⇒ BufferTee

Returns a new instance of BufferTee.



32
33
34
35
# File 'lib/builderator/util/shell.rb', line 32

def initialize(out, *args)
  super(*args)
  @output = out
end

Instance Attribute Details

#outputObject (readonly)

Returns the value of attribute output.



30
31
32
# File 'lib/builderator/util/shell.rb', line 30

def output
  @output
end

Instance Method Details

#write(data) ⇒ Object



37
38
39
40
# File 'lib/builderator/util/shell.rb', line 37

def write(data)
  super(data)
  output.write(data)
end