Class: Embulk::PluginManager
- Inherits:
-
Object
- Object
- Embulk::PluginManager
- Defined in:
- lib/embulk/plugin.rb
Instance Method Summary collapse
- #get_decoder(type) ⇒ Object
- #get_encoder(type) ⇒ Object
- #get_filter(type) ⇒ Object
- #get_formatter(type) ⇒ Object
- #get_guess(type) ⇒ Object
- #get_input(type) ⇒ Object
- #get_output(type) ⇒ Object
- #get_parser(type) ⇒ Object
-
#initialize ⇒ PluginManager
constructor
A new instance of PluginManager.
- #new_java_decoder(type) ⇒ Object
- #new_java_encoder(type) ⇒ Object
- #new_java_filter(type) ⇒ Object
- #new_java_formatter(type) ⇒ Object
- #new_java_guess(type) ⇒ Object
- #new_java_input(type) ⇒ Object
- #new_java_output(type) ⇒ Object
- #new_java_parser(type) ⇒ Object
- #register_decoder(type, klass) ⇒ Object
- #register_encoder(type, klass) ⇒ Object
- #register_filter(type, klass) ⇒ Object
- #register_formatter(type, klass) ⇒ Object
- #register_guess(type, klass) ⇒ Object
- #register_input(type, klass) ⇒ Object
- #register_output(type, klass) ⇒ Object
- #register_parser(type, klass) ⇒ Object
Constructor Details
#initialize ⇒ PluginManager
Returns a new instance of PluginManager.
16 17 18 19 20 21 |
# File 'lib/embulk/plugin.rb', line 16 def initialize @registries = {} %w[input output parser formatter decoder encoder line_filter filter guess].each do |category| @registries[category.to_sym] = PluginRegistry.new(category, "embulk/#{category}_") end end |
Instance Method Details
#get_decoder(type) ⇒ Object
77 78 79 80 |
# File 'lib/embulk/plugin.rb', line 77 def get_decoder(type) # TODO not implemented yet lookup(:guess, type) end |
#get_encoder(type) ⇒ Object
82 83 84 85 |
# File 'lib/embulk/plugin.rb', line 82 def get_encoder(type) # TODO not implemented yet lookup(:guess, type) end |
#get_filter(type) ⇒ Object
87 88 89 90 |
# File 'lib/embulk/plugin.rb', line 87 def get_filter(type) # TODO not implemented yet lookup(:guess, type) end |
#get_formatter(type) ⇒ Object
72 73 74 75 |
# File 'lib/embulk/plugin.rb', line 72 def get_formatter(type) # TODO not implemented yet lookup(:guess, type) end |
#get_guess(type) ⇒ Object
92 93 94 95 |
# File 'lib/embulk/plugin.rb', line 92 def get_guess(type) # TODO not implemented yet lookup(:guess, type) end |
#get_input(type) ⇒ Object
57 58 59 60 |
# File 'lib/embulk/plugin.rb', line 57 def get_input(type) # TODO not implemented yet lookup(:guess, type) end |
#get_output(type) ⇒ Object
62 63 64 65 |
# File 'lib/embulk/plugin.rb', line 62 def get_output(type) # TODO not implemented yet lookup(:guess, type) end |
#get_parser(type) ⇒ Object
67 68 69 70 |
# File 'lib/embulk/plugin.rb', line 67 def get_parser(type) # TODO not implemented yet lookup(:guess, type) end |
#new_java_decoder(type) ⇒ Object
113 114 115 |
# File 'lib/embulk/plugin.rb', line 113 def new_java_decoder(type) lookup(:decoder, type).java_object end |
#new_java_encoder(type) ⇒ Object
117 118 119 |
# File 'lib/embulk/plugin.rb', line 117 def new_java_encoder(type) lookup(:encoder, type).java_object end |
#new_java_filter(type) ⇒ Object
121 122 123 |
# File 'lib/embulk/plugin.rb', line 121 def new_java_filter(type) lookup(:filter, type).java_object end |
#new_java_formatter(type) ⇒ Object
109 110 111 |
# File 'lib/embulk/plugin.rb', line 109 def new_java_formatter(type) lookup(:formatter, type).java_object end |
#new_java_guess(type) ⇒ Object
125 126 127 |
# File 'lib/embulk/plugin.rb', line 125 def new_java_guess(type) lookup(:guess, type).java_object end |
#new_java_input(type) ⇒ Object
97 98 99 |
# File 'lib/embulk/plugin.rb', line 97 def new_java_input(type) lookup(:input, type).java_object end |
#new_java_output(type) ⇒ Object
101 102 103 |
# File 'lib/embulk/plugin.rb', line 101 def new_java_output(type) lookup(:output, type).java_object end |
#new_java_parser(type) ⇒ Object
105 106 107 |
# File 'lib/embulk/plugin.rb', line 105 def new_java_parser(type) lookup(:parser, type).java_object end |
#register_decoder(type, klass) ⇒ Object
40 41 42 |
# File 'lib/embulk/plugin.rb', line 40 def register_decoder(type, klass) register_plugin(:decoder, type, klass, DecoderPlugin) end |
#register_encoder(type, klass) ⇒ Object
44 45 46 |
# File 'lib/embulk/plugin.rb', line 44 def register_encoder(type, klass) register_plugin(:encoder, type, klass, EncoderPlugin) end |
#register_filter(type, klass) ⇒ Object
48 49 50 |
# File 'lib/embulk/plugin.rb', line 48 def register_filter(type, klass) register_plugin(:filter, type, klass, FilterPlugin) end |
#register_formatter(type, klass) ⇒ Object
36 37 38 |
# File 'lib/embulk/plugin.rb', line 36 def register_formatter(type, klass) register_plugin(:formatter, type, klass, FormatterPlugin) end |
#register_guess(type, klass) ⇒ Object
52 53 54 55 |
# File 'lib/embulk/plugin.rb', line 52 def register_guess(type, klass) register_plugin(:guess, type, klass, GuessPlugin, "Guess plugin #{klass} must extend GuessPlugin, LineGuessPlugin, or TextGuessPlugin class") end |
#register_input(type, klass) ⇒ Object
23 24 25 |
# File 'lib/embulk/plugin.rb', line 23 def register_input(type, klass) register_plugin(:input, type, klass, InputPlugin) end |
#register_output(type, klass) ⇒ Object
27 28 29 30 |
# File 'lib/embulk/plugin.rb', line 27 def register_output(type, klass) register_plugin(:output, type, klass, OutputPlugin, "Output plugin #{klass} must extend OutputPlugin") end |
#register_parser(type, klass) ⇒ Object
32 33 34 |
# File 'lib/embulk/plugin.rb', line 32 def register_parser(type, klass) register_plugin(:parser, type, klass, ParserPlugin) end |