Class: Rafflesia::ReleaseRef
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::ReleaseRef
- Defined in:
- lib/rafflesia/foundry/release_ref.rb
Constant Summary collapse
- HASH_ATTRS =
{ artifacts: :artifacts, capabilities: :capabilities, card: :card, content_digest: :content_digest, id: :id, is_content_pinned: :is_content_pinned, lifecycle: :lifecycle, manifest: :manifest, object: :object, repository_id: :repository_id, revision_digest: :revision_digest, revision_id: :revision_id, validation_refs: :validation_refs, version: :version }.freeze
Instance Attribute Summary collapse
-
#artifacts ⇒ Object
Returns the value of attribute artifacts.
-
#capabilities ⇒ Object
Returns the value of attribute capabilities.
-
#card ⇒ Object
Returns the value of attribute card.
-
#content_digest ⇒ Object
Returns the value of attribute content_digest.
-
#id ⇒ Object
Returns the value of attribute id.
-
#is_content_pinned ⇒ Object
Returns the value of attribute is_content_pinned.
-
#lifecycle ⇒ Object
Returns the value of attribute lifecycle.
-
#manifest ⇒ Object
Returns the value of attribute manifest.
-
#object ⇒ Object
Returns the value of attribute object.
-
#repository_id ⇒ Object
Returns the value of attribute repository_id.
-
#revision_digest ⇒ Object
Returns the value of attribute revision_digest.
-
#revision_id ⇒ Object
Returns the value of attribute revision_id.
-
#validation_refs ⇒ Object
Returns the value of attribute validation_refs.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(json) ⇒ ReleaseRef
constructor
A new instance of ReleaseRef.
Constructor Details
#initialize(json) ⇒ ReleaseRef
Returns a new instance of ReleaseRef.
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/rafflesia/foundry/release_ref.rb', line 41 def initialize(json) super() hash = self.class.normalize(json) @artifacts = (hash[:artifacts] || []).map { |item| item ? Rafflesia::RegistryArtifactRef.new(item) : nil } @capabilities = (hash[:capabilities] || []) @card = hash[:card] ? Rafflesia::ReleaseCard.new(hash[:card]) : nil @content_digest = hash[:content_digest] @id = hash[:id] @is_content_pinned = hash[:is_content_pinned] @lifecycle = hash[:lifecycle] ? Rafflesia::ReleaseLifecycle.new(hash[:lifecycle]) : nil @manifest = hash[:manifest] ? Rafflesia::ReleaseManifest.new(hash[:manifest]) : nil @object = hash[:object] @repository_id = hash[:repository_id] @revision_digest = hash[:revision_digest] @revision_id = hash[:revision_id] @validation_refs = (hash[:validation_refs] || []).map { |item| item ? Rafflesia::ValidationRef.new(item) : nil } @version = hash[:version] end |
Instance Attribute Details
#artifacts ⇒ Object
Returns the value of attribute artifacts.
25 26 27 |
# File 'lib/rafflesia/foundry/release_ref.rb', line 25 def artifacts @artifacts end |
#capabilities ⇒ Object
Returns the value of attribute capabilities.
25 26 27 |
# File 'lib/rafflesia/foundry/release_ref.rb', line 25 def capabilities @capabilities end |
#card ⇒ Object
Returns the value of attribute card.
25 26 27 |
# File 'lib/rafflesia/foundry/release_ref.rb', line 25 def card @card end |
#content_digest ⇒ Object
Returns the value of attribute content_digest.
25 26 27 |
# File 'lib/rafflesia/foundry/release_ref.rb', line 25 def content_digest @content_digest end |
#id ⇒ Object
Returns the value of attribute id.
25 26 27 |
# File 'lib/rafflesia/foundry/release_ref.rb', line 25 def id @id end |
#is_content_pinned ⇒ Object
Returns the value of attribute is_content_pinned.
25 26 27 |
# File 'lib/rafflesia/foundry/release_ref.rb', line 25 def is_content_pinned @is_content_pinned end |
#lifecycle ⇒ Object
Returns the value of attribute lifecycle.
25 26 27 |
# File 'lib/rafflesia/foundry/release_ref.rb', line 25 def lifecycle @lifecycle end |
#manifest ⇒ Object
Returns the value of attribute manifest.
25 26 27 |
# File 'lib/rafflesia/foundry/release_ref.rb', line 25 def manifest @manifest end |
#object ⇒ Object
Returns the value of attribute object.
25 26 27 |
# File 'lib/rafflesia/foundry/release_ref.rb', line 25 def object @object end |
#repository_id ⇒ Object
Returns the value of attribute repository_id.
25 26 27 |
# File 'lib/rafflesia/foundry/release_ref.rb', line 25 def repository_id @repository_id end |
#revision_digest ⇒ Object
Returns the value of attribute revision_digest.
25 26 27 |
# File 'lib/rafflesia/foundry/release_ref.rb', line 25 def revision_digest @revision_digest end |
#revision_id ⇒ Object
Returns the value of attribute revision_id.
25 26 27 |
# File 'lib/rafflesia/foundry/release_ref.rb', line 25 def revision_id @revision_id end |
#validation_refs ⇒ Object
Returns the value of attribute validation_refs.
25 26 27 |
# File 'lib/rafflesia/foundry/release_ref.rb', line 25 def validation_refs @validation_refs end |
#version ⇒ Object
Returns the value of attribute version.
25 26 27 |
# File 'lib/rafflesia/foundry/release_ref.rb', line 25 def version @version end |