File.open("...") do |file|
      file << (...)
    end