DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Ruby - Writing To File
// Easy method for quickly writing to file
File.open('/tmp/ruby-write-test.txt', 'w') do |f|
f.puts 'test started at #{Time.now}'
# ... do something
f.puts 'test ended at #{Time.now}'
end




