OSDN Git Service

ADD忘れ
[praisedb/praisedb.git] / lib / object_ext.rb
diff --git a/lib/object_ext.rb b/lib/object_ext.rb
new file mode 100644 (file)
index 0000000..6da4621
--- /dev/null
@@ -0,0 +1,15 @@
+module ObjectExt
+  module ClassMethods
+  end
+
+  module InstanceMethods
+    def yourself
+      self
+    end
+  end
+end
+
+class Object
+  self.extend ObjectExt::ClassMethods
+  self.module_eval { include ObjectExt::InstanceMethods }
+end