Skip to content

Instantly share code, notes, and snippets.

@pgib
Created November 14, 2011 23:32
Show Gist options
  • Select an option

  • Save pgib/1365581 to your computer and use it in GitHub Desktop.

Select an option

Save pgib/1365581 to your computer and use it in GitHub Desktop.
YAML can be hard to write. Instead, go the other way!
require 'yaml'
videos = [
{
:title => "test 1",
:url => "http://test1/"
},
{
:title => "test 2",
:url => "http://test2/"
}
]
puts videos.to_yaml( :Indent => 4, :UseHeader => true)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment