Skip to content

Instantly share code, notes, and snippets.

@vlazzle
Created February 16, 2012 19:17
Show Gist options
  • Save vlazzle/1847104 to your computer and use it in GitHub Desktop.
Save vlazzle/1847104 to your computer and use it in GitHub Desktop.
ruby one-liner for opening a file and reading its contents
file_contents = open 'filename.txt', &:read
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment