Class: Embulk::FilterPlugin

Inherits:
Object
  • Object
show all
Defined in:
embulk-core/src/main/ruby/embulk/filter_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, in_schema, out_schema, page_builder) ⇒ FilterPlugin

Returns a new instance of FilterPlugin



14
15
16
17
18
19
20
# File 'embulk-core/src/main/ruby/embulk/filter_plugin.rb', line 14

def initialize(task, in_schema, out_schema, page_builder)
  @task = task
  @in_schema = in_schema
  @out_schema = out_schema
  @page_builder = page_builder
  init
end

Instance Attribute Details

#in_schemaObject (readonly)

Returns the value of attribute in_schema



22
23
24
# File 'embulk-core/src/main/ruby/embulk/filter_plugin.rb', line 22

def in_schema
  @in_schema
end

#out_schemaObject (readonly)

Returns the value of attribute out_schema



22
23
24
# File 'embulk-core/src/main/ruby/embulk/filter_plugin.rb', line 22

def out_schema
  @out_schema
end

#page_builderObject (readonly)

Returns the value of attribute page_builder



22
23
24
# File 'embulk-core/src/main/ruby/embulk/filter_plugin.rb', line 22

def page_builder
  @page_builder
end

#taskObject (readonly)

Returns the value of attribute task



22
23
24
# File 'embulk-core/src/main/ruby/embulk/filter_plugin.rb', line 22

def task
  @task
end

Class Method Details

.from_java(java_class) ⇒ Object



93
94
95
# File 'embulk-core/src/main/ruby/embulk/filter_plugin.rb', line 93

def self.from_java(java_class)
  JavaPlugin.ruby_adapter_class(java_class, FilterPlugin, RubyAdapter)
end

.new_javaObject



37
38
39
# File 'embulk-core/src/main/ruby/embulk/filter_plugin.rb', line 37

def self.new_java
  JavaAdapter.new(self)
end

.transaction(config, in_schema) {|config| ... } ⇒ Object

Yields:

  • (config)


9
10
11
12
# File 'embulk-core/src/main/ruby/embulk/filter_plugin.rb', line 9

def self.transaction(config, in_schema, &control)
  yield(config)
  return {}
end

Instance Method Details

#add(page) ⇒ Object

Raises:

  • (NotImplementedError)


27
28
29
# File 'embulk-core/src/main/ruby/embulk/filter_plugin.rb', line 27

def add(page)
  raise NotImplementedError, "FilterPlugin#add(page) must be implemented"
end

#closeObject



34
35
# File 'embulk-core/src/main/ruby/embulk/filter_plugin.rb', line 34

def close
end

#finishObject



31
32
# File 'embulk-core/src/main/ruby/embulk/filter_plugin.rb', line 31

def finish
end

#initObject



24
25
# File 'embulk-core/src/main/ruby/embulk/filter_plugin.rb', line 24

def init
end