Class: Droonga::Plugins::Search::GatherCollector

Inherits:
Collector
  • Object
show all
Defined in:
lib/droonga/plugins/search.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



49
50
51
52
53
54
55
56
57
58
# File 'lib/droonga/plugins/search.rb', line 49

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