class Embulk::FormatterPlugin::JavaAdapter::OutputAdapter

Public Class Methods

new(ruby_object, schema, file_output) click to toggle source
# File lib/embulk/formatter_plugin.rb, line 68
def initialize(ruby_object, schema, file_output)
  @ruby_object = ruby_object
  @schema = schema
  @file_output = file_output
end

Public Instance Methods

add(java_page) click to toggle source
# File lib/embulk/formatter_plugin.rb, line 74
def add(java_page)
  # TODO reuse page reader
  @ruby_object.add Page.new(java_page, @schema)
end
close() click to toggle source
# File lib/embulk/formatter_plugin.rb, line 83
def close
  @ruby_object.close
ensure
  @file_output.close
end
finish() click to toggle source
# File lib/embulk/formatter_plugin.rb, line 79
def finish
  @ruby_object.finish
end