[Groonga-commit] groonga/groonga at 2b54dac [master] mruby: use "class << self" style again

Back to archive index

Kouhei Sutou null+****@clear*****
Sat Aug 9 18:46:05 JST 2014


Kouhei Sutou	2014-08-09 18:46:05 +0900 (Sat, 09 Aug 2014)

  New Revision: 2b54dac35de557da0282acd418dedb272a17540b
  https://github.com/groonga/groonga/commit/2b54dac35de557da0282acd418dedb272a17540b

  Message:
    mruby: use "class << self" style again

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

  Modified: lib/mrb/scripts/context/error_level.rb (+5 -2)
===================================================================
--- lib/mrb/scripts/context/error_level.rb    2014-08-09 18:44:00 +0900 (a32becc)
+++ lib/mrb/scripts/context/error_level.rb    2014-08-09 18:46:05 +0900 (c0685f1)
@@ -2,8 +2,11 @@ module Groonga
   class Context
     class ErrorLevel
       @@names = {}
-      def self.find(name)
-        @@names[name]
+
+      class << self
+        def find(name)
+          @@names[name]
+        end
       end
 
       attr_reader :name

  Modified: lib/mrb/scripts/context/rc.rb (+5 -2)
===================================================================
--- lib/mrb/scripts/context/rc.rb    2014-08-09 18:44:00 +0900 (b42b0e8)
+++ lib/mrb/scripts/context/rc.rb    2014-08-09 18:46:05 +0900 (2863c7f)
@@ -2,8 +2,11 @@ module Groonga
   class Context
     class RC
       @@names = {}
-      def self.find(name)
-        @@names[name]
+
+      class << self
+        def find(name)
+          @@names[name]
+        end
       end
 
       attr_reader :name
-------------- next part --------------
HTML����������������������������...
Download 



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