Skip to content

Instantly share code, notes, and snippets.

@Yama-to
Last active August 29, 2015 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Yama-to/6acbdab2da9f27102a2d to your computer and use it in GitHub Desktop.
Save Yama-to/6acbdab2da9f27102a2d to your computer and use it in GitHub Desktop.
YAMLとは何か? - いつもRailsの設定ファイルで出てくるやつの正体 ref: http://qiita.com/Yama-to/items/587544993fb62610528a
−−−
- d1
- d2
- d3
---
- x1
- x2
#=>
["d1", "d2", "d3"]
["x1", "x2"]
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