Class: Embulk::ParserPlugin

Inherits:
Object
  • Object
show all
Defined in:
lib/embulk/parser_plugin.rb

Overview

require 'embulk/file_input' TODO not implemented

Defined Under Namespace

Modules: RubyAdapter Classes: JavaAdapter

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(task, schema, page_builder) ⇒ ParserPlugin

Returns a new instance of ParserPlugin.



13
14
15
16
17
18
# File 'lib/embulk/parser_plugin.rb', line 13

def initialize(task, schema, page_builder)
  @task = task
  @schema = schema
  @page_builder = page_builder
  init
end

Class Method Details

.from_java(java_class) ⇒ Object



64
65
66
# File 'lib/embulk/parser_plugin.rb', line 64

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

.new_java ⇒ Object



28
29
30
# File 'lib/embulk/parser_plugin.rb', line 28

def self.new_java
  JavaAdapter.new(self)
end

.transaction(config, &control) ⇒ Object

Raises:

  • (NotImplementedError)


9
10
11
# File 'lib/embulk/parser_plugin.rb', line 9

def self.transaction(config, &control)
  raise NotImplementedError, "ParserPlugin.transaction(config, &control) must be implemented"
end

Instance Method Details

#init ⇒ Object



20
21
# File 'lib/embulk/parser_plugin.rb', line 20

def init
end

#run(file_input) ⇒ Object

Raises:

  • (NotImplementedError)


23
24
25
# File 'lib/embulk/parser_plugin.rb', line 23

def run(file_input)
  raise NotImplementedError, "ParserPlugin#run(file_input) must be implemented"
end