Archive of posts on Feb 9, 2020
-
Monkey-patching graciously
Monkey-patching is a powerful tool in programming. In this article, I used techniques of Ruby metaprogramming to define a series of methods def_after,def_before, etc. to help monkey-patching. They look graciously in that we can use it to shorten the codes for monkey-patching (avoiding aliasing and repeating codes).- Categories: programming
- Tags: ruby, meta programming, long paper