Link Details

Link 103301 thumbnail
User 111696 avatar

By bloid
via blog.jayfields.com
Published: Aug 15 2008 / 05:06

I've been using modules instead of accessing the metaclass directly. "Just in case someone wants to redefine behavior" isn't really a good enough reason for me if the level of effort increases, but in this case I found the code to be easier to follow when I used modules. In programming, there are few win-win situations, but Ali definitely showed me one on this occasion. If you interact with a metaclass directly, do a quick spike where you introduce a module instead. I think you'll be happy with the resulting code.
  • 5
  • 0
  • 1039
  • 337

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (5)



Voters Against This Link (0)