Class: Rafflesia::RegistryReleaseDetail
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::RegistryReleaseDetail
- Defined in:
- lib/rafflesia/registry/registry_release_detail.rb
Constant Summary collapse
- HASH_ATTRS =
{ artifacts: :artifacts, description: :description, license: :license, manifest_uri: :manifest_uri, owners: :owners, provenance: :provenance, source_url: :source_url, upstream_revision: :upstream_revision }.freeze
Instance Attribute Summary collapse
-
#artifacts ⇒ Object
Returns the value of attribute artifacts.
-
#description ⇒ Object
Returns the value of attribute description.
-
#license ⇒ Object
Returns the value of attribute license.
-
#manifest_uri ⇒ Object
Returns the value of attribute manifest_uri.
-
#owners ⇒ Object
Returns the value of attribute owners.
-
#provenance ⇒ Object
Returns the value of attribute provenance.
-
#source_url ⇒ Object
Returns the value of attribute source_url.
-
#upstream_revision ⇒ Object
Returns the value of attribute upstream_revision.
Instance Method Summary collapse
-
#initialize(json) ⇒ RegistryReleaseDetail
constructor
A new instance of RegistryReleaseDetail.
Constructor Details
#initialize(json) ⇒ RegistryReleaseDetail
Returns a new instance of RegistryReleaseDetail.
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/rafflesia/registry/registry_release_detail.rb', line 29 def initialize(json) super() hash = self.class.normalize(json) @artifacts = (hash[:artifacts] || []).map { |item| item ? Rafflesia::RegistryArtifactRef.new(item) : nil } @description = hash[:description] @license = hash[:license] @manifest_uri = hash[:manifest_uri] @owners = (hash[:owners] || []) @provenance = hash[:provenance] ? Rafflesia::RegistryReleaseProvenance.new(hash[:provenance]) : nil @source_url = hash[:source_url] @upstream_revision = hash[:upstream_revision] end |
Instance Attribute Details
#artifacts ⇒ Object
Returns the value of attribute artifacts.
19 20 21 |
# File 'lib/rafflesia/registry/registry_release_detail.rb', line 19 def artifacts @artifacts end |
#description ⇒ Object
Returns the value of attribute description.
19 20 21 |
# File 'lib/rafflesia/registry/registry_release_detail.rb', line 19 def description @description end |
#license ⇒ Object
Returns the value of attribute license.
19 20 21 |
# File 'lib/rafflesia/registry/registry_release_detail.rb', line 19 def license @license end |
#manifest_uri ⇒ Object
Returns the value of attribute manifest_uri.
19 20 21 |
# File 'lib/rafflesia/registry/registry_release_detail.rb', line 19 def manifest_uri @manifest_uri end |
#owners ⇒ Object
Returns the value of attribute owners.
19 20 21 |
# File 'lib/rafflesia/registry/registry_release_detail.rb', line 19 def owners @owners end |
#provenance ⇒ Object
Returns the value of attribute provenance.
19 20 21 |
# File 'lib/rafflesia/registry/registry_release_detail.rb', line 19 def provenance @provenance end |
#source_url ⇒ Object
Returns the value of attribute source_url.
19 20 21 |
# File 'lib/rafflesia/registry/registry_release_detail.rb', line 19 def source_url @source_url end |
#upstream_revision ⇒ Object
Returns the value of attribute upstream_revision.
19 20 21 |
# File 'lib/rafflesia/registry/registry_release_detail.rb', line 19 def upstream_revision @upstream_revision end |