Skip to content

Instantly share code, notes, and snippets.

@vpivo
Created March 14, 2013 22:51
Show Gist options
  • Save vpivo/5165947 to your computer and use it in GitHub Desktop.
Save vpivo/5165947 to your computer and use it in GitHub Desktop.
Super Simple Journal Writer
date= Time.now.strftime("%m/%d/%y")
puts "Please enter your journal entry for #{date}"
entry_body = gets.chomp!
filename = "Journal_#{Time.now.strftime("%m/%d/%y")}"
jounral_entry = File.new("#{filename}.txt", "w+")
journal_entry puts entry_body
journal_entry.close
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment