Class: Schlepp::Sink::TableObject::Stream

Inherits:
Object
  • Object
show all
Defined in:
lib/schlepp/sink/table_object/stream.rb

Instance Method Summary collapse

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

#finalizeObject



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

#lengthObject



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