class Mail::Gpg::DecryptedPart
Public Class Methods
new(cipher_part, options = {})
click to toggle source
options are:
:verify: decrypt and verify
Calls superclass method
# File lib/mail/gpg/decrypted_part.rb, line 9 def initialize(cipher_part, options = {}) if cipher_part.mime_type != EncryptedPart::CONTENT_TYPE raise EncodingError, "RFC 3156 incorrect mime type for encrypted part '#{cipher_part.mime_type}'" end decrypted = GpgmeHelper.decrypt(cipher_part.body.decoded, options) self.verify_result = decrypted.verify_result if options[:verify] super(decrypted) end