YAML - .
require "yaml"
yaml= ["author","post title","date","time","post category"].to_yaml
File.open("filename", "w") do |f|
f.write(yaml)
end
- author
- post title
- date
- time
- post category
,
require "yaml"
YAML.load(File.read("filename")) # => ["author","post title","date","time","post category"]
Yaml , ( ooffice). . Yaml ruby, . itrodution yaml: http://yaml.kwiki.org/?YamlInFiveMinutes.