ITP - files - simple_file.txt 2

irb :002 >  sample = File.open("simple_file.txt",  "w+")
 => #<File:simple_file.txt>
irb :003 > sample.puts("another example of writing to a file.")
 => nil
irb :004 > sample.close
 => nil
irb :005 > File.read("simple_file.txt")
 => "another example of writing to a file.\n"