Module: Mail::Gpg::VerifyResultAttribute
- Included in:
- GPGME::Data, VerifiedPart
- Defined in:
- lib/mail/gpg/verify_result_attribute.rb
Instance Method Summary collapse
-
#signature_valid? ⇒ Boolean
checks validity of signatures (true / false).
-
#signatures ⇒ Object
list of all signatures from verify_result.
-
#verify_result(result = nil) ⇒ Object
the result of signature verification, as provided by GPGME.
- #verify_result=(result) ⇒ Object
Instance Method Details
#signature_valid? ⇒ Boolean
checks validity of signatures (true / false)
18 19 20 21 |
# File 'lib/mail/gpg/verify_result_attribute.rb', line 18 def signature_valid? sigs = self.signatures sigs.any? && sigs.detect{|s|!s.valid?}.blank? end |
#signatures ⇒ Object
list of all signatures from verify_result
24 25 26 27 28 |
# File 'lib/mail/gpg/verify_result_attribute.rb', line 24 def signatures [verify_result].flatten.compact.map do |vr| vr.signatures end.flatten.compact end |
#verify_result(result = nil) ⇒ Object
the result of signature verification, as provided by GPGME
6 7 8 9 10 11 12 |
# File 'lib/mail/gpg/verify_result_attribute.rb', line 6 def verify_result(result = nil) if result self.verify_result = result else @verify_result end end |
#verify_result=(result) ⇒ Object
13 14 15 |
# File 'lib/mail/gpg/verify_result_attribute.rb', line 13 def verify_result=(result) @verify_result = result end |