Class: LetsencryptPlugin::FileOutput

Inherits:
CertificateOutput show all
Defined in:
lib/letsencrypt_plugin/file_output.rb

Instance Method Summary collapse

Methods inherited from CertificateOutput

#output

Constructor Details

#initialize(domain, cert, out_dir) ⇒ FileOutput

Returns a new instance of FileOutput.



5
6
7
8
# File 'lib/letsencrypt_plugin/file_output.rb', line 5

def initialize(domain, cert, out_dir)
  super(domain, cert)
  @output_dir = out_dir
end

Instance Method Details

#display_infoObject



14
15
16
# File 'lib/letsencrypt_plugin/file_output.rb', line 14

def display_info
  Rails.logger.info('Saving certificates and key...')
end

#output_cert(cert_type, cert_content) ⇒ Object



10
11
12
# File 'lib/letsencrypt_plugin/file_output.rb', line 10

def output_cert(cert_type, cert_content)
  File.write(File.join(@output_dir, "#{@domain}-#{cert_type}"), cert_content)
end