Created
August 31, 2013 13:10
-
-
Save tdantas/6398083 to your computer and use it in GitHub Desktop.
YAML References
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
%w(yaml ap).each { |dep| require dep } | |
obj = YAML::load(DATA) | |
ap obj['test']['host'] | |
__END__ | |
development: &dev | |
host: localhost | |
user: username | |
password: password | |
adapter: postgres | |
test: *dev |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment