NAME redef.rb DESCRIPTION a sane way to redefine methods in ruby INSTALL gem install redef SAMPLES <========< samples/a.rb >========> ~ > cat samples/a.rb # redef is a super simple way to robustly override methods - providing the # POLS method of referring to the previous method as (wait for it) super. # it's really that simple # require 'redef' class C def foo() 30 end p C.new.foo #=> 30 redef do def foo() super + 2 end end p C.new.foo #=> 32 redef do def foo() super + 10 end end p C.new.foo #=> 42 end ~ > ruby samples/a.rb 30 32 42