Class: Rafflesia::RegistrySourceSnapshot
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::RegistrySourceSnapshot
- Defined in:
- lib/rafflesia/foundry/registry_source_snapshot.rb
Constant Summary collapse
- HASH_ATTRS =
{ content_digest: :content_digest, name: :name, provider: :provider, sha256: :sha_256, source_uri: :source_uri, version: :version }.freeze
Instance Attribute Summary collapse
-
#content_digest ⇒ Object
Returns the value of attribute content_digest.
-
#name ⇒ Object
Returns the value of attribute name.
-
#provider ⇒ Object
Returns the value of attribute provider.
-
#sha_256 ⇒ Object
Returns the value of attribute sha_256.
-
#source_uri ⇒ Object
Returns the value of attribute source_uri.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(json) ⇒ RegistrySourceSnapshot
constructor
A new instance of RegistrySourceSnapshot.
Constructor Details
#initialize(json) ⇒ RegistrySourceSnapshot
Returns a new instance of RegistrySourceSnapshot.
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/rafflesia/foundry/registry_source_snapshot.rb', line 25 def initialize(json) super() hash = self.class.normalize(json) @content_digest = hash[:content_digest] @name = hash[:name] @provider = hash[:provider] @sha_256 = hash[:sha256] @source_uri = hash[:source_uri] @version = hash[:version] end |
Instance Attribute Details
#content_digest ⇒ Object
Returns the value of attribute content_digest.
17 18 19 |
# File 'lib/rafflesia/foundry/registry_source_snapshot.rb', line 17 def content_digest @content_digest end |
#name ⇒ Object
Returns the value of attribute name.
17 18 19 |
# File 'lib/rafflesia/foundry/registry_source_snapshot.rb', line 17 def name @name end |
#provider ⇒ Object
Returns the value of attribute provider.
17 18 19 |
# File 'lib/rafflesia/foundry/registry_source_snapshot.rb', line 17 def provider @provider end |
#sha_256 ⇒ Object
Returns the value of attribute sha_256.
17 18 19 |
# File 'lib/rafflesia/foundry/registry_source_snapshot.rb', line 17 def sha_256 @sha_256 end |
#source_uri ⇒ Object
Returns the value of attribute source_uri.
17 18 19 |
# File 'lib/rafflesia/foundry/registry_source_snapshot.rb', line 17 def source_uri @source_uri end |
#version ⇒ Object
Returns the value of attribute version.
17 18 19 |
# File 'lib/rafflesia/foundry/registry_source_snapshot.rb', line 17 def version @version end |