Last active
August 29, 2015 14:25
-
-
Save Yama-to/6acbdab2da9f27102a2d to your computer and use it in GitHub Desktop.
YAMLとは何か? - いつもRailsの設定ファイルで出てくるやつの正体 ref: http://qiita.com/Yama-to/items/587544993fb62610528a
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
−−− | |
- d1 | |
- d2 | |
- d3 | |
--- | |
- x1 | |
- x2 | |
#=> | |
["d1", "d2", "d3"] | |
["x1", "x2"] |
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
File.open('input.yml') do |io| | |
YAML.load_documents(io) do |d| | |
p d | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment