Yoji Shidara
null+****@clear*****
Thu Dec 19 16:06:52 JST 2013
Yoji Shidara 2013-12-19 16:06:52 +0900 (Thu, 19 Dec 2013) New Revision: 43ace348904aa399f6eef48c8fad8dfd30c6ee41 https://github.com/droonga/fluent-plugin-droonga/commit/43ace348904aa399f6eef48c8fad8dfd30c6ee41 Merged ce62e72: Merge branch 'refactor-searcher' Message: Add ResultFormatter.format method Modified files: lib/droonga/searcher.rb Modified: lib/droonga/searcher.rb (+7 -2) =================================================================== --- lib/droonga/searcher.rb 2013-12-19 15:48:38 +0900 (c8e5f47) +++ lib/droonga/searcher.rb 2013-12-19 16:06:52 +0900 (235abff) @@ -75,8 +75,7 @@ module Droonga if searcher.need_output? $log.trace("#{log_tag}: process_queries: format: start", :name => name) - formatter = ResultFormatter.new(search_request, search_result) - outputs[name] = formatter.format + outputs[name] = ResultFormatter.format(search_request, search_result) $log.trace("#{log_tag}: process_queries: format: done", :name => name) end @@ -307,6 +306,12 @@ module Droonga end class ResultFormatter + class << self + def format(search_request, search_result) + new(search_request, search_result).format + end + end + def initialize(search_request, search_result) @request = search_request @result = search_result -------------- next part -------------- HTML����������������������������... Descargar