Class: EnMail::CertificateFinder
- Inherits:
-
Object
- Object
- EnMail::CertificateFinder
- Defined in:
- lib/enmail/certificate_finder.rb
Class Method Summary collapse
-
.find_by_email(email) ⇒ Object
Self.find_by_email.
Instance Method Summary collapse
-
#certificate ⇒ Object
Certificate.
-
#initialize(email:) ⇒ CertificateFinder
constructor
A new instance of CertificateFinder.
-
#private_key ⇒ Object
Private Key.
Constructor Details
#initialize(email:) ⇒ CertificateFinder
Returns a new instance of CertificateFinder.
5 6 7 |
# File 'lib/enmail/certificate_finder.rb', line 5 def initialize(email:) @email = email end |
Class Method Details
.find_by_email(email) ⇒ Object
Self.find_by_email
Initialize a new instnace with more readble interface.
33 34 35 |
# File 'lib/enmail/certificate_finder.rb', line 33 def self.find_by_email(email) new(email: email) end |
Instance Method Details
#certificate ⇒ Object
Certificate
This returns an ‘OpenSSL::X509::Certificate` instnace which usages the content for the pem certificate. The certificate name is the dotify version of the email with `pem` ext.
15 16 17 |
# File 'lib/enmail/certificate_finder.rb', line 15 def certificate certificate_instance end |
#private_key ⇒ Object
Private Key
This returns an ‘OpenSSL::PKey::RSA` instnace which usages the content for keyfile. The keyfile is the dotify version of the email with `key` ext.
25 26 27 |
# File 'lib/enmail/certificate_finder.rb', line 25 def private_key private_key_instance end |