Class: Rafflesia::ArtifactManifestImportData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::ArtifactManifestImportData
- Defined in:
- lib/rafflesia/artifacts/artifact_manifest_import_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ artifact_count: :artifact_count, external_reference_count: :external_reference_count, failure_count: :failure_count, imported_structure_count: :imported_structure_count, manifest: :manifest, manifest_id: :manifest_id, manifest_object: :manifest_object, manifest_path: :manifest_path, paper_count: :paper_count, results: :results }.freeze
Instance Attribute Summary collapse
-
#artifact_count ⇒ Object
Returns the value of attribute artifact_count.
-
#external_reference_count ⇒ Object
Returns the value of attribute external_reference_count.
-
#failure_count ⇒ Object
Returns the value of attribute failure_count.
-
#imported_structure_count ⇒ Object
Returns the value of attribute imported_structure_count.
-
#manifest ⇒ Object
Returns the value of attribute manifest.
-
#manifest_id ⇒ Object
Returns the value of attribute manifest_id.
-
#manifest_object ⇒ Object
Returns the value of attribute manifest_object.
-
#manifest_path ⇒ Object
Returns the value of attribute manifest_path.
-
#paper_count ⇒ Object
Returns the value of attribute paper_count.
-
#results ⇒ Object
Returns the value of attribute results.
Instance Method Summary collapse
-
#initialize(json) ⇒ ArtifactManifestImportData
constructor
A new instance of ArtifactManifestImportData.
Constructor Details
#initialize(json) ⇒ ArtifactManifestImportData
Returns a new instance of ArtifactManifestImportData.
33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/rafflesia/artifacts/artifact_manifest_import_data.rb', line 33 def initialize(json) super() hash = self.class.normalize(json) @artifact_count = hash[:artifact_count] @external_reference_count = hash[:external_reference_count] @failure_count = hash[:failure_count] @imported_structure_count = hash[:imported_structure_count] @manifest = hash[:manifest] ? Rafflesia::ArtifactManifest.new(hash[:manifest]) : nil @manifest_id = hash[:manifest_id] @manifest_object = hash[:manifest_object] ? Rafflesia::ObjectRef.new(hash[:manifest_object]) : nil @manifest_path = hash[:manifest_path] @paper_count = hash[:paper_count] @results = (hash[:results] || []).map { |item| item ? Rafflesia::ArtifactImportResult.new(item) : nil } end |
Instance Attribute Details
#artifact_count ⇒ Object
Returns the value of attribute artifact_count.
21 22 23 |
# File 'lib/rafflesia/artifacts/artifact_manifest_import_data.rb', line 21 def artifact_count @artifact_count end |
#external_reference_count ⇒ Object
Returns the value of attribute external_reference_count.
21 22 23 |
# File 'lib/rafflesia/artifacts/artifact_manifest_import_data.rb', line 21 def external_reference_count @external_reference_count end |
#failure_count ⇒ Object
Returns the value of attribute failure_count.
21 22 23 |
# File 'lib/rafflesia/artifacts/artifact_manifest_import_data.rb', line 21 def failure_count @failure_count end |
#imported_structure_count ⇒ Object
Returns the value of attribute imported_structure_count.
21 22 23 |
# File 'lib/rafflesia/artifacts/artifact_manifest_import_data.rb', line 21 def imported_structure_count @imported_structure_count end |
#manifest ⇒ Object
Returns the value of attribute manifest.
21 22 23 |
# File 'lib/rafflesia/artifacts/artifact_manifest_import_data.rb', line 21 def manifest @manifest end |
#manifest_id ⇒ Object
Returns the value of attribute manifest_id.
21 22 23 |
# File 'lib/rafflesia/artifacts/artifact_manifest_import_data.rb', line 21 def manifest_id @manifest_id end |
#manifest_object ⇒ Object
Returns the value of attribute manifest_object.
21 22 23 |
# File 'lib/rafflesia/artifacts/artifact_manifest_import_data.rb', line 21 def manifest_object @manifest_object end |
#manifest_path ⇒ Object
Returns the value of attribute manifest_path.
21 22 23 |
# File 'lib/rafflesia/artifacts/artifact_manifest_import_data.rb', line 21 def manifest_path @manifest_path end |
#paper_count ⇒ Object
Returns the value of attribute paper_count.
21 22 23 |
# File 'lib/rafflesia/artifacts/artifact_manifest_import_data.rb', line 21 def paper_count @paper_count end |
#results ⇒ Object
Returns the value of attribute results.
21 22 23 |
# File 'lib/rafflesia/artifacts/artifact_manifest_import_data.rb', line 21 def results @results end |