When monkey patching an instance method, can you call the overridden method from the new implementation?

前端 未结 3 1278
深忆病人
深忆病人 2020-11-22 03:01

Say I am monkey patching a method in a class, how could I call the overridden method from the overriding method? I.e. Something a bit like super

E.g.

3条回答
  •  没有蜡笔的小新
    2020-11-22 03:46

    The class that will make override must to be reloaded after class that contains the original method, so require it in the file that will make overrride.

提交回复
热议问题