Class: MailAuth::ArcResult
- Inherits:
-
Data
- Object
- Data
- MailAuth::ArcResult
- Defined in:
- lib/mailauth/result.rb
Overview
Whether the chain holds, and who sealed it — never whether any of them is to be believed. A chain is cheap to forge over a message of one's own, so trust is the caller's decision and deliberately has no answer here.
Instance Attribute Summary collapse
-
#comment ⇒ Object
readonly
Returns the value of attribute comment.
-
#oldest_pass ⇒ Object
readonly
Returns the value of attribute oldest_pass.
-
#sets ⇒ Object
readonly
Returns the value of attribute sets.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(status:, sets: [], oldest_pass: nil, comment: nil) ⇒ ArcResult
constructor
A new instance of ArcResult.
- #intact? ⇒ Boolean
- #newest ⇒ Object
-
#sealers ⇒ Object
Oldest hop first, the order they sealed in.
Constructor Details
#initialize(status:, sets: [], oldest_pass: nil, comment: nil) ⇒ ArcResult
Returns a new instance of ArcResult.
77 78 79 |
# File 'lib/mailauth/result.rb', line 77 def initialize(status:, sets: [], oldest_pass: nil, comment: nil) super end |
Instance Attribute Details
#comment ⇒ Object (readonly)
Returns the value of attribute comment
76 77 78 |
# File 'lib/mailauth/result.rb', line 76 def comment @comment end |
#oldest_pass ⇒ Object (readonly)
Returns the value of attribute oldest_pass
76 77 78 |
# File 'lib/mailauth/result.rb', line 76 def oldest_pass @oldest_pass end |
#sets ⇒ Object (readonly)
Returns the value of attribute sets
76 77 78 |
# File 'lib/mailauth/result.rb', line 76 def sets @sets end |
#status ⇒ Object (readonly)
Returns the value of attribute status
76 77 78 |
# File 'lib/mailauth/result.rb', line 76 def status @status end |
Instance Method Details
#intact? ⇒ Boolean
90 91 92 |
# File 'lib/mailauth/result.rb', line 90 def intact? status == Status::PASS end |
#newest ⇒ Object
81 82 83 |
# File 'lib/mailauth/result.rb', line 81 def newest sets.max_by(&:instance) end |
#sealers ⇒ Object
Oldest hop first, the order they sealed in.
86 87 88 |
# File 'lib/mailauth/result.rb', line 86 def sealers sets.sort_by(&:instance).filter_map { |set| set.seal&.domain } end |