Class: Builderator::Util::Shell::BufferTee
- Inherits:
-
StringIO
- Object
- StringIO
- Builderator::Util::Shell::BufferTee
- Defined in:
- lib/builderator/util/shell.rb
Overview
Buffer an IO stream and forward to another IO instance
Instance Attribute Summary collapse
-
#output ⇒ Object
readonly
Returns the value of attribute output.
Instance Method Summary collapse
-
#initialize(out, *args) ⇒ BufferTee
constructor
A new instance of BufferTee.
- #write(data) ⇒ Object
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
#output ⇒ Object (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 |