Class: Rafflesia::ObjectArtifactImportData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::ObjectArtifactImportData
- Defined in:
- lib/rafflesia/objects/object_artifact_import_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ absolute_path: :absolute_path, collection: :collection, detected_format: :detected_format, file_count: :file_count, files: :files, has_required_files: :has_required_files, input_path: :input_path, manifest: :manifest, manifest_object: :manifest_object, manifest_path: :manifest_path, material_kind: :material_kind, required_sets: :required_sets, schema_version: :schema_version, storage_backends: :storage_backends, total_size_bytes: :total_size_bytes }.freeze
Instance Attribute Summary collapse
-
#absolute_path ⇒ Object
Returns the value of attribute absolute_path.
-
#collection ⇒ Object
Returns the value of attribute collection.
-
#detected_format ⇒ Object
Returns the value of attribute detected_format.
-
#file_count ⇒ Object
Returns the value of attribute file_count.
-
#files ⇒ Object
Returns the value of attribute files.
-
#has_required_files ⇒ Object
Returns the value of attribute has_required_files.
-
#input_path ⇒ Object
Returns the value of attribute input_path.
-
#manifest ⇒ Object
Returns the value of attribute manifest.
-
#manifest_object ⇒ Object
Returns the value of attribute manifest_object.
-
#manifest_path ⇒ Object
Returns the value of attribute manifest_path.
-
#material_kind ⇒ Object
Returns the value of attribute material_kind.
-
#required_sets ⇒ Object
Returns the value of attribute required_sets.
-
#schema_version ⇒ Object
Returns the value of attribute schema_version.
-
#storage_backends ⇒ Object
Returns the value of attribute storage_backends.
-
#total_size_bytes ⇒ Object
Returns the value of attribute total_size_bytes.
Instance Method Summary collapse
-
#initialize(json) ⇒ ObjectArtifactImportData
constructor
A new instance of ObjectArtifactImportData.
Constructor Details
#initialize(json) ⇒ ObjectArtifactImportData
Returns a new instance of ObjectArtifactImportData.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/rafflesia/objects/object_artifact_import_data.rb', line 43 def initialize(json) super() hash = self.class.normalize(json) @absolute_path = hash[:absolute_path] @collection = hash[:collection] ? Rafflesia::ObjectArtifactCollectionData.new(hash[:collection]) : nil @detected_format = hash[:detected_format] @file_count = hash[:file_count] @files = (hash[:files] || []).map { |item| item ? Rafflesia::ObjectArtifactImportedFile.new(item) : nil } @has_required_files = hash[:has_required_files] @input_path = hash[:input_path] @manifest = hash[:manifest] ? Rafflesia::ObjectArtifactManifestSummary.new(hash[:manifest]) : nil @manifest_object = hash[:manifest_object] ? Rafflesia::ObjectRef.new(hash[:manifest_object]) : nil @manifest_path = hash[:manifest_path] @material_kind = hash[:material_kind] @required_sets = (hash[:required_sets] || []).map { |item| item ? Rafflesia::ObjectArtifactRequiredSet.new(item) : nil } @schema_version = hash[:schema_version] @storage_backends = (hash[:storage_backends] || []) @total_size_bytes = hash[:total_size_bytes] end |
Instance Attribute Details
#absolute_path ⇒ Object
Returns the value of attribute absolute_path.
26 27 28 |
# File 'lib/rafflesia/objects/object_artifact_import_data.rb', line 26 def absolute_path @absolute_path end |
#collection ⇒ Object
Returns the value of attribute collection.
26 27 28 |
# File 'lib/rafflesia/objects/object_artifact_import_data.rb', line 26 def collection @collection end |
#detected_format ⇒ Object
Returns the value of attribute detected_format.
26 27 28 |
# File 'lib/rafflesia/objects/object_artifact_import_data.rb', line 26 def detected_format @detected_format end |
#file_count ⇒ Object
Returns the value of attribute file_count.
26 27 28 |
# File 'lib/rafflesia/objects/object_artifact_import_data.rb', line 26 def file_count @file_count end |
#files ⇒ Object
Returns the value of attribute files.
26 27 28 |
# File 'lib/rafflesia/objects/object_artifact_import_data.rb', line 26 def files @files end |
#has_required_files ⇒ Object
Returns the value of attribute has_required_files.
26 27 28 |
# File 'lib/rafflesia/objects/object_artifact_import_data.rb', line 26 def has_required_files @has_required_files end |
#input_path ⇒ Object
Returns the value of attribute input_path.
26 27 28 |
# File 'lib/rafflesia/objects/object_artifact_import_data.rb', line 26 def input_path @input_path end |
#manifest ⇒ Object
Returns the value of attribute manifest.
26 27 28 |
# File 'lib/rafflesia/objects/object_artifact_import_data.rb', line 26 def manifest @manifest end |
#manifest_object ⇒ Object
Returns the value of attribute manifest_object.
26 27 28 |
# File 'lib/rafflesia/objects/object_artifact_import_data.rb', line 26 def manifest_object @manifest_object end |
#manifest_path ⇒ Object
Returns the value of attribute manifest_path.
26 27 28 |
# File 'lib/rafflesia/objects/object_artifact_import_data.rb', line 26 def manifest_path @manifest_path end |
#material_kind ⇒ Object
Returns the value of attribute material_kind.
26 27 28 |
# File 'lib/rafflesia/objects/object_artifact_import_data.rb', line 26 def material_kind @material_kind end |
#required_sets ⇒ Object
Returns the value of attribute required_sets.
26 27 28 |
# File 'lib/rafflesia/objects/object_artifact_import_data.rb', line 26 def required_sets @required_sets end |
#schema_version ⇒ Object
Returns the value of attribute schema_version.
26 27 28 |
# File 'lib/rafflesia/objects/object_artifact_import_data.rb', line 26 def schema_version @schema_version end |
#storage_backends ⇒ Object
Returns the value of attribute storage_backends.
26 27 28 |
# File 'lib/rafflesia/objects/object_artifact_import_data.rb', line 26 def storage_backends @storage_backends end |
#total_size_bytes ⇒ Object
Returns the value of attribute total_size_bytes.
26 27 28 |
# File 'lib/rafflesia/objects/object_artifact_import_data.rb', line 26 def total_size_bytes @total_size_bytes end |