「Ruby入門」YAMLファイルにRubyのハッシュデータを出力する
rubyコード:
require 'yaml’
h = {}
h[:name] = “Robert"
h[:nickname] = “Bob"
h[:age] = 43
h[:email_addresses] = {:home => “bob@arkgame.com",
:work => “robert@arkgame.com"}
puts h.to_yaml
Coding Changes the World
rubyコード:
require 'yaml’
h = {}
h[:name] = “Robert"
h[:nickname] = “Bob"
h[:age] = 43
h[:email_addresses] = {:home => “bob@arkgame.com",
:work => “robert@arkgame.com"}
puts h.to_yaml