test/test.rb in procemon-0.1.3 vs test/test.rb in procemon-0.1.4
- old
+ new
@@ -1,17 +1,33 @@
require_relative "../lib/procemon.rb"
+class TestT
-class Test1
+ def self.test
+ puts self
+ end
+
+ def test
+ puts self
+ end
+
end
-class Test2 < Test1
+TestT.inject_instance_method :test do
+ puts "hello world! instance"
+
end
+TestT.inject_singleton_method :test, :after do
-ret= Array.new
-Test1.each_subclass{|c| ret.push c}
-puts ret
+ puts "hello world! singleton"
+end
+TestT.test
+TestT.new.test
+#> TestT
+#> hello world! singleton
+#> hello world! instance
+#> #<TestT:0x0000000288b808>
\ No newline at end of file