[Groonga-commit] droonga/droonga-engine at 8d1692e [master] 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: 8d1692e316a31e56ad74e15513164a18e25a3c57
  https://github.com/droonga/droonga-engine/commit/8d1692e316a31e56ad74e15513164a18e25a3c57

  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����������������������������...
Descargar 



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