[Groonga-commit] droonga/droonga-engine at b31cab2 [buffered-forward] Use guard-if style more clearly

Back to archive index

YUKI Hiroshi null+****@clear*****
Tue Mar 24 13:29:29 JST 2015


YUKI Hiroshi	2015-03-24 13:29:29 +0900 (Tue, 24 Mar 2015)

  New Revision: b31cab29398577ee5d8e20a17bdf4161716a952d
  https://github.com/droonga/droonga-engine/commit/b31cab29398577ee5d8e20a17bdf4161716a952d

  Message:
    Use guard-if style more clearly

  Modified files:
    lib/droonga/command/remote.rb

  Modified: lib/droonga/command/remote.rb (+13 -7)
===================================================================
--- lib/droonga/command/remote.rb    2015-03-24 13:27:49 +0900 (e4acbbc)
+++ lib/droonga/command/remote.rb    2015-03-24 13:29:29 +0900 (a0d493c)
@@ -51,20 +51,26 @@ module Droonga
         end
 
         def should_process?
+          if****@param*****?
+            log("anonymous query (to be processed)")
+            return true
+          end
           unless for_this_cluster?
             log("query for different cluster (to be ignroed)")
             return false
           end
-          if for_me?
-            log("query for this node (to be processed)")
+
+          unles****@param*****?("node")
+            log("anonymous node query (to be processed)")
             return true
           end
-          if****@param*****? or not****@param*****?("node")
-            log("anonymous query (to be processed)")
-            return true
+          unless for_me?
+            log("query for different node (to be ignored)")
+            return false
           end
-          log("query for different node (to be ignored)")
-          return false
+
+          log("query for this node (to be processed)")
+          true
         end
 
         private
-------------- next part --------------
HTML����������������������������...
Télécharger 



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