Ruby instance_eval
Adding methods to an instance “on-the-fly” is a pretty common pattern in Ruby (activerecord, activesupport, etc..).
To do so, we can use the BasicObject#instance_eval
methods.. see more
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!
Adding methods to an instance “on-the-fly” is a pretty common pattern in Ruby (activerecord, activesupport, etc..).
To do so, we can use the BasicObject#instance_eval
methods.. see more
Post a comment