Wednesday, September 1, 2010

Sometimes, Ruby is Beautiful

I hate \concise languages, since they seem so data-use averse (i.e., cheap), but sometimes Ruby is so cool

@config = YAML.load(File.open("#{RAILS_ROOT}/config/my_thinger.yml"))[RAILS_ENV].symbolize_keys

The String interpolation here is totally unnecessary, of course, but idiomatic.

No comments: