4 Ways To Avoid Monkey Patching
If you’re considering monkey patching but you know it’s a bad idea, here are four alternatives, in order from most preferable to least preferable.
Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!
If you’re considering monkey patching but you know it’s a bad idea, here are four alternatives, in order from most preferable to least preferable.
Comments
Additionally you may use
define_singleton_methodor Ruby’s refinements (my personal favorite and my highest recommendation).Post a comment