Skip to content

Instantly share code, notes, and snippets.

Created December 18, 2012 19:20
Show Gist options
  • Save anonymous/4331041 to your computer and use it in GitHub Desktop.
Save anonymous/4331041 to your computer and use it in GitHub Desktop.
@@_file_contents = (File.read(file_name).strip if File.exists?(file_name))
-- or --
@@_file_contensts = File.exists?(file_name) ? File.read(file_name).strip : nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment