Class: Schlepp::Sink::TableObject::Stream
- Inherits:
-
Object
- Object
- Schlepp::Sink::TableObject::Stream
- Defined in:
- lib/schlepp/sink/table_object/stream.rb
Instance Method Summary collapse
- #finalize ⇒ Object
-
#initialize(table_object_writer) ⇒ Stream
constructor
A new instance of Stream.
- #length ⇒ Object
- #write(data) ⇒ Object
Constructor Details
#initialize(table_object_writer) ⇒ Stream
Returns a new instance of Stream.
5 6 7 |
# File 'lib/schlepp/sink/table_object/stream.rb', line 5 def initialize(table_object_writer) @table_object_writer = table_object_writer end |
Instance Method Details
#finalize ⇒ Object
17 18 19 20 21 |
# File 'lib/schlepp/sink/table_object/stream.rb', line 17 def finalize @stream.finalize @table_object_writer.write(@stream.to_s) end |
#length ⇒ Object
13 14 15 |
# File 'lib/schlepp/sink/table_object/stream.rb', line 13 def length @stream.length end |
#write(data) ⇒ Object
9 10 11 |
# File 'lib/schlepp/sink/table_object/stream.rb', line 9 def write(data) @stream.write(data) end |