middleman/middleman — pull request #1311 by tdreyno (2014-07-03 02:08:37+00:00)
Title: Experiment with Contracts

Playing around with the `contracts` library in "Test" mode. Really, really enjoying it so far.

For one, a lot of our code docs are actually out of date or missing possible param/return values.

For another, it helped me find a really bad habit of returning `false` instead of `nil` when things can't be found.

There's also a lot of super-side-effect-y methods that this really points out.

Take a look, tell me what you think. It doesn't make sense for all methods (zero-params with no return) and it's a little weird when there is no return value, but Ruby auto-returns some loop or value.