This post originated from an RSS feed registered with Ruby Buzz
by Ryan Davis.
Original Post: functional_test_matrix gets a nice little boost
Feed Title: Polishing Ruby
Feed URL: http://blog.zenspider.com/index.rdf
Feed Description: Musings on Ruby and the Ruby Community...
I've been wanting to do something like this for a little while... Namely, I was getting tired of cryptic little codes for everything. Here and there I don't mind, but for every action I'd rather the nominal case fade into the background. So, like :na, I added :OK, which has the added benefit of rendering green instead of blue in emacs (because it is uppercase, I think ruby-mode thinks it is a const).
See how nice all those error cases pop out at you now? I love that. Now I can gloss over the green OKs and question everything else (n/a's and errors alike). It'll help me question my requirements even more.
:OK dispatches to a validator with the same name as the action, so now they're more readable.