posts

from the last 2 weeks
Rails' StringInquirer

A recent commit to Rails. When the last method of a method chain ends with a question mark, the entire chain reads like a question.

$> Rails.env == 'production'
$> # => true

$> Rails.env.production?
$> # => true

The latter is much better. I love these smart little additions. Any string wrapped up in a StringInquirer has this functionality.

2008 by Ryan Heath | Get In Touch

flickr

DesolateInfinityLooking upDazedBlurred