Class: Rafflesia::ArtifactManifest
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::ArtifactManifest
- Defined in:
- lib/rafflesia/artifacts/artifact_manifest.rb
Constant Summary collapse
- HASH_ATTRS =
{ created_at: :created_at, description: :description, label: :label, manifest_id: :manifest_id, manifest_version: :manifest_version, papers: :papers, source: :source }.freeze
Instance Attribute Summary collapse
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#description ⇒ Object
Returns the value of attribute description.
-
#label ⇒ Object
Returns the value of attribute label.
-
#manifest_id ⇒ Object
Returns the value of attribute manifest_id.
-
#manifest_version ⇒ Object
Returns the value of attribute manifest_version.
-
#papers ⇒ Object
Returns the value of attribute papers.
-
#source ⇒ Object
Returns the value of attribute source.
Instance Method Summary collapse
-
#initialize(json) ⇒ ArtifactManifest
constructor
A new instance of ArtifactManifest.
Constructor Details
#initialize(json) ⇒ ArtifactManifest
Returns a new instance of ArtifactManifest.
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/rafflesia/artifacts/artifact_manifest.rb', line 27 def initialize(json) super() hash = self.class.normalize(json) @created_at = hash[:created_at] @description = hash[:description] @label = hash[:label] @manifest_id = hash[:manifest_id] @manifest_version = hash[:manifest_version] @papers = (hash[:papers] || []).map { |item| item ? Rafflesia::ArtifactPaper.new(item) : nil } @source = hash[:source] end |
Instance Attribute Details
#created_at ⇒ Object
Returns the value of attribute created_at.
18 19 20 |
# File 'lib/rafflesia/artifacts/artifact_manifest.rb', line 18 def created_at @created_at end |
#description ⇒ Object
Returns the value of attribute description.
18 19 20 |
# File 'lib/rafflesia/artifacts/artifact_manifest.rb', line 18 def description @description end |
#label ⇒ Object
Returns the value of attribute label.
18 19 20 |
# File 'lib/rafflesia/artifacts/artifact_manifest.rb', line 18 def label @label end |
#manifest_id ⇒ Object
Returns the value of attribute manifest_id.
18 19 20 |
# File 'lib/rafflesia/artifacts/artifact_manifest.rb', line 18 def manifest_id @manifest_id end |
#manifest_version ⇒ Object
Returns the value of attribute manifest_version.
18 19 20 |
# File 'lib/rafflesia/artifacts/artifact_manifest.rb', line 18 def manifest_version @manifest_version end |
#papers ⇒ Object
Returns the value of attribute papers.
18 19 20 |
# File 'lib/rafflesia/artifacts/artifact_manifest.rb', line 18 def papers @papers end |
#source ⇒ Object
Returns the value of attribute source.
18 19 20 |
# File 'lib/rafflesia/artifacts/artifact_manifest.rb', line 18 def source @source end |