Sha256: 6d9c3cb3e7db1f6c259280ef247a5600ef442a2a0adb27797b7cd932b4d824b1
Contents?: true
Size: 555 Bytes
Versions: 13
Compression:
Stored size: 555 Bytes
Contents
require_relative "../lib/procemon.rb" class TestT def self.test puts self end def test string puts self,string end end TestT.inject_instance_method :test do |str| puts "hello world! instance "+str end TestT.inject_singleton_method :test, add: "after" do puts "hello world! singleton" end puts "---\nafter,singleton case:" TestT.test puts "---\nbefore,instance case:" TestT.new.test "boogie man" #after,singleton case: #TestT #hello world! singleton # #before,instance case: #hello world! instance ##<TestT:0x00000000d4a008>
Version data entries
13 entries across 13 versions & 1 rubygems