def file
      contents = certificates.map { |cert| cert.to_pem }.join
      write_file("chain-#{domain}.pem", contents)
    end
def file
      contents = certificates.map { |cert| cert.to_pem }.join
      write_file("chain-#{domain}.pem", contents)
    end
Just pass all certificates into the new instance. We use the variadic
 argument feature here to ease the usage and improve the readability.

 Example:

   certs_chain_file = Billy::CertificateChain.new('localhost',
                                                  cert1,
                                                  cert2, ..).file
 Write out the certificates chain file and pass the path back. This will
 produce a temporary file which will be remove after the current process
 terminates.