[Groonga-commit] droonga/droonga-engine at 4cbc1ed [master] Use named parameters instead of confusable list of arguments

Back to archive index

YUKI Hiroshi null+****@clear*****
Thu Apr 30 11:38:24 JST 2015


YUKI Hiroshi	2015-04-30 11:38:24 +0900 (Thu, 30 Apr 2015)

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

  Message:
    Use named parameters instead of confusable list of arguments

  Modified files:
    lib/droonga/cluster.rb
    lib/droonga/engine.rb

  Modified: lib/droonga/cluster.rb (+2 -2)
===================================================================
--- lib/droonga/cluster.rb    2015-04-30 11:36:51 +0900 (1ae1297)
+++ lib/droonga/cluster.rb    2015-04-30 11:38:24 +0900 (3dc0f23)
@@ -63,8 +63,8 @@ module Droonga
 
     attr_accessor :catalog
 
-    def initialize(loop, params)
-      @loop = loop
+    def initialize(params)
+      @loop = params[:loop]
 
       @params = params
       @catalog = params[:catalog]

  Modified: lib/droonga/engine.rb (+1 -1)
===================================================================
--- lib/droonga/engine.rb    2015-04-30 11:36:51 +0900 (ce6a588)
+++ lib/droonga/engine.rb    2015-04-30 11:38:24 +0900 (d4b0970)
@@ -46,7 +46,7 @@ module Droonga
                                :catalog  => @catalog,
                                :internal_connection_lifetime =>
                                  options[:internal_connection_lifetime])
-      @cluster = Cluster.new(loop,
+      @cluster = Cluster.new(:loop     => loop,
                              :catalog  => @catalog,
                              :internal_connection_lifetime =>
                                options[:internal_connection_lifetime])
-------------- next part --------------
HTML����������������������������...
Descargar 



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