hookit¶
-
class
tollan.utils.hookit(obj, name: str)[source]¶ Bases:
contextlib.ContextDecoratorA context manager that allow inject code to object’s method.
- Parameters
- objobject
The object to alter.
- namestr
The name of the method to hook.
Methods Summary
set_post_func(func)Call
funcafter the hooked function.Methods Documentation