Class: Embulk::FormatterPlugin
- Inherits:
-
Object
- Object
- Embulk::FormatterPlugin
show all
- Defined in:
- lib/embulk/formatter_plugin.rb
Defined Under Namespace
Modules: RubyAdapter
Classes: JavaAdapter
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(task, schema, file_output) ⇒ FormatterPlugin
Returns a new instance of FormatterPlugin.
14
15
16
17
18
19
|
# File 'lib/embulk/formatter_plugin.rb', line 14
def initialize(task, schema, file_output)
@task = task
@schema = schema
@file_output = file_output
init
end
|
Instance Attribute Details
#file_output ⇒ Object
Returns the value of attribute file_output.
21
22
23
|
# File 'lib/embulk/formatter_plugin.rb', line 21
def file_output
@file_output
end
|
#schema ⇒ Object
Returns the value of attribute schema.
21
22
23
|
# File 'lib/embulk/formatter_plugin.rb', line 21
def schema
@schema
end
|
#task ⇒ Object
Returns the value of attribute task.
21
22
23
|
# File 'lib/embulk/formatter_plugin.rb', line 21
def task
@task
end
|
Class Method Details
.from_java(java_class) ⇒ Object
91
92
93
|
# File 'lib/embulk/formatter_plugin.rb', line 91
def self.from_java(java_class)
JavaPlugin.ruby_adapter_class(java_class, FormatterPlugin, RubyAdapter)
end
|
.new_java ⇒ Object
36
37
38
|
# File 'lib/embulk/formatter_plugin.rb', line 36
def self.new_java
JavaAdapter.new(self)
end
|
.transaction(config, schema) {|config| ... } ⇒ Object
9
10
11
12
|
# File 'lib/embulk/formatter_plugin.rb', line 9
def self.transaction(config, schema, &control)
yield(config)
return {}
end
|
Instance Method Details
#add(page) ⇒ Object
26
27
28
|
# File 'lib/embulk/formatter_plugin.rb', line 26
def add(page)
raise NotImplementedError, "FormatterPlugin#add(page) must be implemented"
end
|
#close ⇒ Object
33
34
|
# File 'lib/embulk/formatter_plugin.rb', line 33
def close
end
|
#finish ⇒ Object
30
31
|
# File 'lib/embulk/formatter_plugin.rb', line 30
def finish
end
|
#init ⇒ Object
23
24
|
# File 'lib/embulk/formatter_plugin.rb', line 23
def init
end
|