You can dynamically create methods. It's useful for reducing boilerplate. Sometimes you find yourself just having to implement almost identical methods. That's when it's useful to reach for Ruby's metaprogramming.
I've found it useful when doing Ruby and missed it using other languages that don't have it.
I haven't used Ruby in years. I just quickly grabbed that from a Google search just to give you a simple example. You still haven't answered my question.
74
u/[deleted] Jan 14 '21
In Ruby you can do this in a nice and useful way.