Class: Microsandbox::SnapshotVerifyReport
- Inherits:
-
Object
- Object
- Microsandbox::SnapshotVerifyReport
- Defined in:
- lib/microsandbox/snapshot.rb
Overview
The result of Microsandbox::Snapshot.verify.
Instance Attribute Summary collapse
-
#algorithm ⇒ String?
readonly
Digest algorithm (when :verified).
-
#content_digest ⇒ String?
readonly
Matched content digest (when :verified).
-
#digest ⇒ String
readonly
Manifest digest.
-
#path ⇒ String
readonly
Artifact directory path.
-
#status ⇒ Symbol
readonly
:not_recorded or :verified.
Instance Method Summary collapse
-
#initialize(data) ⇒ SnapshotVerifyReport
constructor
A new instance of SnapshotVerifyReport.
-
#not_recorded? ⇒ Boolean
Whether no integrity descriptor was recorded.
-
#verified? ⇒ Boolean
Whether content integrity was recorded and matched.
Constructor Details
#initialize(data) ⇒ SnapshotVerifyReport
Returns a new instance of SnapshotVerifyReport.
94 95 96 97 98 99 100 |
# File 'lib/microsandbox/snapshot.rb', line 94 def initialize(data) @digest = data["digest"] @path = data["path"] @status = data["upper_status"].to_sym @algorithm = data["upper_algorithm"] @content_digest = data["upper_digest"] end |
Instance Attribute Details
#algorithm ⇒ String? (readonly)
Returns digest algorithm (when :verified).
90 91 92 |
# File 'lib/microsandbox/snapshot.rb', line 90 def algorithm @algorithm end |
#content_digest ⇒ String? (readonly)
Returns matched content digest (when :verified).
92 93 94 |
# File 'lib/microsandbox/snapshot.rb', line 92 def content_digest @content_digest end |
#digest ⇒ String (readonly)
Returns manifest digest.
84 85 86 |
# File 'lib/microsandbox/snapshot.rb', line 84 def digest @digest end |
#path ⇒ String (readonly)
Returns artifact directory path.
86 87 88 |
# File 'lib/microsandbox/snapshot.rb', line 86 def path @path end |
#status ⇒ Symbol (readonly)
Returns :not_recorded or :verified.
88 89 90 |
# File 'lib/microsandbox/snapshot.rb', line 88 def status @status end |
Instance Method Details
#not_recorded? ⇒ Boolean
Returns whether no integrity descriptor was recorded.
105 |
# File 'lib/microsandbox/snapshot.rb', line 105 def not_recorded? = @status == :not_recorded |
#verified? ⇒ Boolean
Returns whether content integrity was recorded and matched.
103 104 |
# File 'lib/microsandbox/snapshot.rb', line 103 def verified? = @status == :verified # @return [Boolean] whether no integrity descriptor was recorded |