Class: Gem::Guardian::ChecksumProvider::Result
- Inherits:
-
Data
- Object
- Data
- Gem::Guardian::ChecksumProvider::Result
- Defined in:
- lib/gem/guardian/checksum_provider.rb
Overview
Independent checksum data returned by a provider.
Instance Attribute Summary collapse
-
#provider ⇒ Object
readonly
Returns the value of attribute provider.
-
#sha256 ⇒ Object
readonly
Returns the value of attribute sha256.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#verification_uri ⇒ Object
readonly
Returns the value of attribute verification_uri.
Instance Method Summary collapse
-
#to_h ⇒ Hash{Symbol => Object}
JSON-friendly representation of the provider result, including the checksum, provider name, source category, and verification URI.
Instance Attribute Details
#provider ⇒ Object (readonly)
Returns the value of attribute provider
28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/gem/guardian/checksum_provider.rb', line 28 Result = Data.define(:sha256, :source, :provider, :verification_uri) do # @return [Hash{Symbol => Object}] JSON-friendly representation of the provider result, # including the checksum, provider name, source category, and verification URI def to_h { sha256: sha256, source: source, provider: provider, verification_uri: verification_uri } end end |
#sha256 ⇒ Object (readonly)
Returns the value of attribute sha256
28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/gem/guardian/checksum_provider.rb', line 28 Result = Data.define(:sha256, :source, :provider, :verification_uri) do # @return [Hash{Symbol => Object}] JSON-friendly representation of the provider result, # including the checksum, provider name, source category, and verification URI def to_h { sha256: sha256, source: source, provider: provider, verification_uri: verification_uri } end end |
#source ⇒ Object (readonly)
Returns the value of attribute source
28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/gem/guardian/checksum_provider.rb', line 28 Result = Data.define(:sha256, :source, :provider, :verification_uri) do # @return [Hash{Symbol => Object}] JSON-friendly representation of the provider result, # including the checksum, provider name, source category, and verification URI def to_h { sha256: sha256, source: source, provider: provider, verification_uri: verification_uri } end end |
#verification_uri ⇒ Object (readonly)
Returns the value of attribute verification_uri
28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/gem/guardian/checksum_provider.rb', line 28 Result = Data.define(:sha256, :source, :provider, :verification_uri) do # @return [Hash{Symbol => Object}] JSON-friendly representation of the provider result, # including the checksum, provider name, source category, and verification URI def to_h { sha256: sha256, source: source, provider: provider, verification_uri: verification_uri } end end |
Instance Method Details
#to_h ⇒ Hash{Symbol => Object}
Returns JSON-friendly representation of the provider result, including the checksum, provider name, source category, and verification URI.
31 32 33 34 35 36 37 38 |
# File 'lib/gem/guardian/checksum_provider.rb', line 31 def to_h { sha256: sha256, source: source, provider: provider, verification_uri: verification_uri } end |