require 'psych' require 'yaml' yaml = YAML.load(open("foo.yml")) (yamlはArray/Hash/String/Integer/Floatからなるrubyデータ構造)
yaml = YAML.load(io) # ioから読み込み yaml = YAML.load("- [a, b, c]") # yaml文字列を読み込み
str = YAML.dump(yaml)