[Groonga-commit] droonga/fluent-plugin-droonga at 937ae41 [output-attributes] Switch formats by switching formatter

Back to archive index

Yoji Shidara null+****@clear*****
Thu Jan 23 10:47:28 JST 2014


Yoji Shidara	2014-01-23 10:47:28 +0900 (Thu, 23 Jan 2014)

  New Revision: 937ae41a6f33ff03ea4be52d30f63334a0317982
  https://github.com/droonga/fluent-plugin-droonga/commit/937ae41a6f33ff03ea4be52d30f63334a0317982

  Message:
    Switch formats by switching formatter

  Modified files:
    lib/droonga/searcher.rb

  Modified: lib/droonga/searcher.rb (+4 -12)
===================================================================
--- lib/droonga/searcher.rb    2014-01-23 10:44:13 +0900 (68174ad)
+++ lib/droonga/searcher.rb    2014-01-23 10:47:28 +0900 (5cd93a5)
@@ -489,11 +489,13 @@ module Droonga
       end
 
       def format_attributes
+        attributes_formatter = nil
         if****@reque*****_output?
-          format_attributes_complex(output_target_attributes)
+          attributes_formatter = ComplexAttributesFormatter.new
         else
-          format_attributes_simple(output_target_attributes)
+          attributes_formatter = SimpleAttributesFormatter.new
         end
+        attributes_formatter.format(output_target_attributes, @result.records)
       end
 
       def output_target_attributes
@@ -501,16 +503,6 @@ module Droonga
         normalize_target_attributes(attributes)
       end
 
-      def format_attributes_simple(attributes)
-        formatter = SimpleAttributesFormatter.new
-        formatter.format(attributes, @result.records)
-      end
-
-      def format_attributes_complex(attributes)
-        formatter = ComplexAttributesFormatter.new
-        formatter.format(attributes, @result.records)
-      end
-
       def format_records
         formatted_records = nil
         cursor_options = {
-------------- next part --------------
HTML����������������������������...
下載 



More information about the Groonga-commit mailing list
Back to archive index