[Groonga-commit] groonga/groonga at be1ce2d [master] mrb: support searching RC by name

Zurück zum Archiv-Index

Kouhei Sutou null+****@clear*****
Thu Aug 7 12:22:04 JST 2014


Kouhei Sutou	2014-08-07 12:22:04 +0900 (Thu, 07 Aug 2014)

  New Revision: be1ce2d7a511150331c68030fbca53f44b40c3d1
  https://github.com/groonga/groonga/commit/be1ce2d7a511150331c68030fbca53f44b40c3d1

  Message:
    mrb: support searching RC by name

  Modified files:
    lib/mrb/scripts/context/rc.rb

  Modified: lib/mrb/scripts/context/rc.rb (+8 -0)
===================================================================
--- lib/mrb/scripts/context/rc.rb    2014-08-07 12:21:48 +0900 (7fa1228)
+++ lib/mrb/scripts/context/rc.rb    2014-08-07 12:22:04 +0900 (1b14a4c)
@@ -1,8 +1,16 @@
 module Groonga
   class Context
     class RC
+      @@names = {}
+      class << self
+        def find(name)
+          @@names[name]
+        end
+      end
+
       attr_reader :name
       def initialize(name, code)
+        @@names[name] = self
         @name = name
         @code = code
       end
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Zurück zum Archiv-Index