Add wrapMethod
function
#365
aleclarson
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The
wrapMethod
function replaces an existing method on an object with a custom-wrapped version.Monkey-patching can be useful when dealing with rigid third-party APIs. This might be a bit too much syntactic sugar for Radashi, but I’m proposing it anyway because I believe wrapMethod makes the intended modification clearer.
Potential implementation
Example
Beta Was this translation helpful? Give feedback.
All reactions