Class: Mail::Gpg::VersionPart
- Inherits:
-
Part
- Object
- Part
- Mail::Gpg::VersionPart
- Defined in:
- lib/mail/gpg/version_part.rb
Constant Summary collapse
- VERSION_1 =
'Version: 1'
- CONTENT_TYPE =
'application/pgp-encrypted'
- CONTENT_DESC =
'PGP/MIME Versions Identification'
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(*args) ⇒ VersionPart
constructor
A new instance of VersionPart.
Constructor Details
#initialize(*args) ⇒ VersionPart
Returns a new instance of VersionPart.
10 11 12 13 14 15 |
# File 'lib/mail/gpg/version_part.rb', line 10 def initialize(*args) super body VERSION_1 content_type CONTENT_TYPE content_description CONTENT_DESC end |
Class Method Details
.isVersionPart?(part) ⇒ Boolean
17 18 19 |
# File 'lib/mail/gpg/version_part.rb', line 17 def self.isVersionPart?(part) part.mime_type == CONTENT_TYPE && part.body =~ /#{VERSION_1}/ end |