Skip to content

Instantly share code, notes, and snippets.

@adambair
Created November 26, 2008 01:04
Show Gist options
  • Save adambair/29206 to your computer and use it in GitHub Desktop.
Save adambair/29206 to your computer and use it in GitHub Desktop.
require 'yaml'
# write yaml to a file
open('filename', 'w') {|f| f << something.to_yaml}
# read yaml from a file
something = YAML.load(open('filename'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment