[Groonga-commit] ranguba/groonga-client at 3a31560 [master] select response: add each shortcut

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Dec 9 18:44:10 JST 2016


Kouhei Sutou	2016-12-09 18:44:10 +0900 (Fri, 09 Dec 2016)

  New Revision: 3a31560823233394bfd17de732824cc20529e899
  https://github.com/ranguba/groonga-client/commit/3a31560823233394bfd17de732824cc20529e899

  Message:
    select response: add each shortcut

  Modified files:
    lib/groonga/client/request/select.rb

  Modified: lib/groonga/client/request/select.rb (+6 -0)
===================================================================
--- lib/groonga/client/request/select.rb    2016-12-09 18:18:29 +0900 (3669717)
+++ lib/groonga/client/request/select.rb    2016-12-09 18:44:10 +0900 (f950511)
@@ -18,6 +18,8 @@ module Groonga
   class Client
     module Request
       class Select < Base
+        include Enumerable
+
         class << self
           def command_name
             "select"
@@ -80,6 +82,10 @@ module Groonga
           offset(offset).limit(per_page)
         end
 
+        def each(&block)
+          response.records.each(&block)
+        end
+
         private
         def create_response
           response = super
-------------- next part --------------
HTML����������������������������...
下载 



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