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.
Yeah dude. I miss Ruby. Such a great language, and such a pity it's fallen out of use. There's Elixir as well, that has gained a bit popularity recently. But still, nothing mainstream.
60
u/NotSteve_ evil Jan 14 '21
Haha seriously? What possible use could writing functions in strings have