Class: LetsencryptPlugin::FileOutput
- Inherits:
-
CertificateOutput
- Object
- CertificateOutput
- LetsencryptPlugin::FileOutput
- Defined in:
- lib/letsencrypt_plugin/file_output.rb
Instance Method Summary collapse
- #display_info ⇒ Object
-
#initialize(domain, cert, out_dir) ⇒ FileOutput
constructor
A new instance of FileOutput.
- #output_cert(cert_type, cert_content) ⇒ Object
Methods inherited from CertificateOutput
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_info ⇒ Object
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 |