Sha256: 604b6262f91c3691ebfd862adfba72356b874c8e2a49b46fd7ff59a25fb6c382
Contents?: true
Size: 390 Bytes
Versions: 5
Compression:
Stored size: 390 Bytes
Contents
module Wrrr def self.included( base ) base.module_eval do alias_method :old_doit, :doit remove_method :doit end def doit "Yes" end def doit2 "Yes" end end end class Test def doit "Hallo" end include Wrrr end t = Test.new puts t.old_doit puts t.doit puts t.doit2
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
build-tool-0.1.4 | test.rb |
build-tool-0.1.3 | test.rb |
build-tool-0.1.2 | test.rb |
build-tool-0.1.0 | test.rb |
build-tool-0.1.1 | test.rb |