News for hackers. Stuff that matters.
Re:The Dynamic Def – abusing Ruby's def statement by seivadmas on Sunday October 18, 2015 @01:28PM (#10408940)
Agree with you 100%, and the ability to dynamically define methods is one of Ruby's great strengths.

However, metaprogramming is a power that should be used wisely. When implemented unnecessarily it reduces readability (and probably performance) for no real gain.

The devise source contains some great examples of metaprogramming used properly:

https://github.com/plataformatec/devise/blob/master/lib/devi...

There are no comments on this comment yet.