Class: Droonga::Plugins::Basic::GatherCollector

Inherits:
Collector
  • Object
show all
Defined in:
lib/droonga/plugins/basic.rb

Instance Method Summary collapse

Methods inherited from Collector

#initialize, message

Methods included from Droonga::Pluggable

#find_sub_classes, #options

Constructor Details

This class inherits a constructor from Droonga::Collector

Instance Method Details

#collect(message) ⇒ Object



28
29
30
31
32
33
34
35
36
# File 'lib/droonga/plugins/basic.rb', line 28

def collect(message)
  output = message.input || message.name
  if output.is_a?(Hash)
    output_name = output["output"]
  else
    output_name = output
  end
  message.values[output_name] = message.value
end