Class: Embulk::FilterPlugin::JavaAdapter::OutputAdapter

Inherits:
Object
  • Object
show all
Includes:
Java::TransactionalPageOutput
Defined in:
embulk-core/src/main/ruby/embulk/filter_plugin.rb

Instance Method Summary collapse

Constructor Details

#initialize(ruby_object, in_schema, page_builder) ⇒ OutputAdapter

Returns a new instance of OutputAdapter



71
72
73
74
75
# File 'embulk-core/src/main/ruby/embulk/filter_plugin.rb', line 71

def initialize(ruby_object, in_schema, page_builder)
  @ruby_object = ruby_object
  @in_schema = in_schema
  @page_builder = page_builder
end

Instance Method Details

#add(java_page) ⇒ Object



77
78
79
# File 'embulk-core/src/main/ruby/embulk/filter_plugin.rb', line 77

def add(java_page)
  @ruby_object.add Page.new(java_page, @in_schema)
end

#closeObject



85
86
87
88
89
# File 'embulk-core/src/main/ruby/embulk/filter_plugin.rb', line 85

def close
  @ruby_object.close
ensure
  @page_builder.close
end

#finishObject



81
82
83
# File 'embulk-core/src/main/ruby/embulk/filter_plugin.rb', line 81

def finish
  @ruby_object.finish
end