The most easy way is to start keys with colon ':'
:db:
- :host: db.host.com
:port: 5210
Now when you load this
db_config = YAML::load(File.open(File.expand_path('../config/database.yml', File.dirname(__FILE__))))
it will be "symbolized"
Awesome. Thank you.
ReplyDeleteAwesome thank you! This lets me use YAML to work with the new double splat in ruby 2.0
ReplyDelete