[Groonga-commit] droonga/fluent-plugin-droonga at d623044 [master] Extract format_{start, elapsed}_time methods

Back to archive index

Yoji Shidara null+****@clear*****
Thu Dec 19 19:16:13 JST 2013


Yoji Shidara	2013-12-19 19:16:13 +0900 (Thu, 19 Dec 2013)

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

  Message:
    Extract format_{start,elapsed}_time methods

  Modified files:
    lib/droonga/searcher.rb

  Modified: lib/droonga/searcher.rb (+10 -2)
===================================================================
--- lib/droonga/searcher.rb    2013-12-19 19:07:59 +0900 (9362885)
+++ lib/droonga/searcher.rb    2013-12-19 19:16:13 +0900 (8cd6782)
@@ -352,11 +352,11 @@ module Droonga
         end
 
         if need_element_output?("startTime")
-          formatted_result["startTime"] =****@resul*****_time.iso8601
+          format_start_time(formatted_result)
         end
 
         if need_element_output?("elapsedTime")
-          formatted_result["elapsedTime"] =****@resul*****_time.to_f -****@resul*****_time.to_f
+          format_elapsed_time(formatted_result)
         end
 
         formatted_result
@@ -497,6 +497,14 @@ module Droonga
       def accessor_name?(source)
         /\A[a-zA-Z\#@$_][a-zA-Z\d\#@$_\-.]*\z/ === source
       end
+
+      def format_start_time(formatted_result)
+        formatted_result["startTime"] =****@resul*****_time.iso8601
+      end
+
+      def format_elapsed_time(formatted_result)
+        formatted_result["elapsedTime"] =****@resul*****_time.to_f -****@resul*****_time.to_f
+      end
     end
   end
 end
-------------- next part --------------
HTML����������������������������...
Download 



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