Class: Droonga::OutputAdapter
- Inherits:
-
Object
- Object
- Droonga::OutputAdapter
- Includes:
- Pluggable
- Defined in:
- lib/droonga/output_adapter.rb
Instance Method Summary collapse
- #adapt(message) ⇒ Object
-
#initialize(dispatcher, options = {}) ⇒ OutputAdapter
constructor
A new instance of OutputAdapter.
Methods included from Pluggable
#process, #processable?, #shutdown
Constructor Details
#initialize(dispatcher, options = {}) ⇒ OutputAdapter
Returns a new instance of OutputAdapter.
26 27 28 29 |
# File 'lib/droonga/output_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 42 |
# File 'lib/droonga/output_adapter.rb', line 31 def adapt() = ["via"].reverse_each do |command| @plugins.each do |plugin| next unless plugin.processable?(command) = OutputMessage.new() process(command, ) = . end end end |