Class: Moxml::Signature::ReferenceResult
- Inherits:
-
Object
- Object
- Moxml::Signature::ReferenceResult
- Defined in:
- lib/moxml/signature/reference_result.rb
Overview
Per-reference digest comparison result. valid? is true iff the
freshly-computed digest matches the expected DigestValue.
Instance Attribute Summary collapse
-
#computed ⇒ Object
readonly
Returns the value of attribute computed.
-
#digest_method ⇒ Object
readonly
Returns the value of attribute digest_method.
-
#expected ⇒ Object
readonly
Returns the value of attribute expected.
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
Instance Method Summary collapse
-
#initialize(uri:, digest_method:, expected:, computed:) ⇒ ReferenceResult
constructor
A new instance of ReferenceResult.
- #valid? ⇒ Boolean
Constructor Details
#initialize(uri:, digest_method:, expected:, computed:) ⇒ ReferenceResult
Returns a new instance of ReferenceResult.
10 11 12 13 14 15 |
# File 'lib/moxml/signature/reference_result.rb', line 10 def initialize(uri:, digest_method:, expected:, computed:) @uri = uri @digest_method = digest_method @expected = expected @computed = computed end |
Instance Attribute Details
#computed ⇒ Object (readonly)
Returns the value of attribute computed.
8 9 10 |
# File 'lib/moxml/signature/reference_result.rb', line 8 def computed @computed end |
#digest_method ⇒ Object (readonly)
Returns the value of attribute digest_method.
8 9 10 |
# File 'lib/moxml/signature/reference_result.rb', line 8 def digest_method @digest_method end |
#expected ⇒ Object (readonly)
Returns the value of attribute expected.
8 9 10 |
# File 'lib/moxml/signature/reference_result.rb', line 8 def expected @expected end |
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
8 9 10 |
# File 'lib/moxml/signature/reference_result.rb', line 8 def uri @uri end |
Instance Method Details
#valid? ⇒ Boolean
17 18 19 |
# File 'lib/moxml/signature/reference_result.rb', line 17 def valid? expected == computed end |