Skip to content

Instantly share code, notes, and snippets.

@tobstarr
Created July 5, 2013 09:32
Show Gist options
  • Save tobstarr/5933299 to your computer and use it in GitHub Desktop.
Save tobstarr/5933299 to your computer and use it in GitHub Desktop.
require "yaml"
require "awesome_print"
ap YAML.load(DATA.read)
__END__
a:
name: John
email: [email protected]
b:
- enabled
- profile:
name: John
email: [email protected]
c:
- enabled
- profile:
name: John
email: [email protected]
--------------------
{
"a" => {
"name" => "John",
"email" => "[email protected]"
},
"b" => [
[0] "enabled",
[1] {
"profile" => nil,
"name" => "John",
"email" => "[email protected]"
}
],
"c" => [
[0] "enabled",
[1] {
"profile" => {
"name" => "John",
"email" => "[email protected]"
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment