Class: Droonga::InputAdapter
- Inherits:
-
Object
- Object
- Droonga::InputAdapter
- Includes:
- Pluggable
- Defined in:
- lib/droonga/input_adapter.rb
Instance Method Summary collapse
- #adapt(message) ⇒ Object
-
#initialize(dispatcher, options = {}) ⇒ InputAdapter
constructor
A new instance of InputAdapter.
Methods included from Pluggable
#process, #processable?, #shutdown
Constructor Details
#initialize(dispatcher, options = {}) ⇒ InputAdapter
Returns a new instance of InputAdapter.
26 27 28 29 |
# File 'lib/droonga/input_adapter.rb', line 26 def initialize(dispatcher, ={}) @dispatcher = dispatcher load_plugins([:plugins] || []) end |
Instance Method Details
#adapt(message) ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/droonga/input_adapter.rb', line 31 def adapt() = @plugins.each do |plugin| = InputMessage.new() command = .command next unless plugin.processable?(command) process(command, ) = . end end |