Posts tagged oo

2 posts

The Secret to Rails OO Design - Literate Programming

Yep, that's right. A Ruby class that inherets from nothing. It's so simple that it hides in plain sight. Loved by those who've mastered Rails, Plain Old Ruby Objects, or "POROs" as some like to call them, are a hidden weapon against complexity. Here's what I mean. Examine this 'simple' model:

Better Ruby Presenters - Literate Programming

But I digress: objects > functions. At least in the context of getting stuff done in Ruby. This pretty much applies to most of the rest of the points in this post, so just keep that in the back of your brain.