Add wrapMethod
function
#365
Closed
aleclarson
started this conversation in
Ideas
Replies: 1 comment
-
Changed my mind on this one, but still open to community feedback. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
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