-
-
Save aclarke-iseatz/4331068 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# read contents of file if it exists and hasn't already been read and it exists | |
@@_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 |
jnwheeler44
commented
Dec 18, 2012
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment