[Groonga-commit] groonga/groonga-command [master] parameters -> arguments

Back to archive index

Kouhei Sutou null+****@clear*****
Sun Nov 25 19:15:47 JST 2012


Kouhei Sutou	2012-11-25 19:15:47 +0900 (Sun, 25 Nov 2012)

  New Revision: fd8836804dbb5ce53d5ec54ae261dbfbf1c44b25
  https://github.com/groonga/groonga-command/commit/fd8836804dbb5ce53d5ec54ae261dbfbf1c44b25

  Log:
    parameters -> arguments

  Modified files:
    test/groonga-command-test-utils.rb

  Modified: test/groonga-command-test-utils.rb (+12 -12)
===================================================================
--- test/groonga-command-test-utils.rb    2012-11-25 19:14:58 +0900 (1f6b517)
+++ test/groonga-command-test-utils.rb    2012-11-25 19:15:47 +0900 (28c696a)
@@ -24,25 +24,25 @@ require "groonga/command"
 module GroongaCommandTestUtils
   module CommandParser
     private
-    def command(name, parameters)
-      Groonga::Command.find(name).new(name, parameters)
+    def command(name, arguments)
+      Groonga::Command.find(name).new(name, arguments)
     end
 
-    def parse_http_path(command, parameters)
+    def parse_http_path(command, arguments)
       path = "/d/#{command}.json"
-      unless parameters.empty?
-        uri_parameters = parameters.collect do |key, value|
+      unless arguments.empty?
+        uri_arguments = arguments.collect do |key, value|
           [CGI.escape(key.to_s), CGI.escape(value.to_s)].join("=")
         end
         path << "?"
-        path << uri_parameters.join("&")
+        path << uri_arguments.join("&")
       end
       Groonga::Command::Parser.parse(path)
     end
 
-    def parse_command_line(command, parameters)
+    def parse_command_line(command, arguments)
       command_line = "#{command} --output_type json"
-      parameters.each do |key, value|
+      arguments.each do |key, value|
         if /"| / =~ value
           escaped_value = '"' + value.gsub(/"/, '\"') + '"'
         else
@@ -58,8 +58,8 @@ module GroongaCommandTestUtils
     include CommandParser
 
     private
-    def parse(command, parameters={})
-      parse_http_path(command, parameters)
+    def parse(command, arguments={})
+      parse_http_path(command, arguments)
     end
   end
 
@@ -67,8 +67,8 @@ module GroongaCommandTestUtils
     include CommandParser
 
     private
-    def parse(command, parameters={})
-      parse_command_line(command, parameters)
+    def parse(command, arguments={})
+      parse_command_line(command, arguments)
     end
   end
 end
-------------- next part --------------
HTML����������������������������...
Télécharger 



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