Class: Rafflesia::ObjectArtifactMaterializeData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::ObjectArtifactMaterializeData
- Defined in:
- lib/rafflesia/object_artifacts/object_artifact_materialize_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ all_cache_hits: :all_cache_hits, file_count: :file_count, files: :files, manifest: :manifest, metrics: :metrics, target_dir: :target_dir, total_size_bytes: :total_size_bytes, verified: :verified }.freeze
Instance Attribute Summary collapse
-
#all_cache_hits ⇒ Object
Returns the value of attribute all_cache_hits.
-
#file_count ⇒ Object
Returns the value of attribute file_count.
-
#files ⇒ Object
Returns the value of attribute files.
-
#manifest ⇒ Object
Returns the value of attribute manifest.
-
#metrics ⇒ Object
Returns the value of attribute metrics.
-
#target_dir ⇒ Object
Returns the value of attribute target_dir.
-
#total_size_bytes ⇒ Object
Returns the value of attribute total_size_bytes.
-
#verified ⇒ Object
Returns the value of attribute verified.
Instance Method Summary collapse
-
#initialize(json) ⇒ ObjectArtifactMaterializeData
constructor
A new instance of ObjectArtifactMaterializeData.
Constructor Details
#initialize(json) ⇒ ObjectArtifactMaterializeData
Returns a new instance of ObjectArtifactMaterializeData.
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/rafflesia/object_artifacts/object_artifact_materialize_data.rb', line 29 def initialize(json) super() hash = self.class.normalize(json) @all_cache_hits = hash[:all_cache_hits] @file_count = hash[:file_count] @files = (hash[:files] || []).map { |item| item ? Rafflesia::ObjectArtifactMaterializedFile.new(item) : nil } @manifest = hash[:manifest] ? Rafflesia::ObjectArtifactManifestSummary.new(hash[:manifest]) : nil @metrics = hash[:metrics] ? Rafflesia::CacheMaterializationMetrics.new(hash[:metrics]) : nil @target_dir = hash[:target_dir] @total_size_bytes = hash[:total_size_bytes] @verified = hash[:verified] end |
Instance Attribute Details
#all_cache_hits ⇒ Object
Returns the value of attribute all_cache_hits.
19 20 21 |
# File 'lib/rafflesia/object_artifacts/object_artifact_materialize_data.rb', line 19 def all_cache_hits @all_cache_hits end |
#file_count ⇒ Object
Returns the value of attribute file_count.
19 20 21 |
# File 'lib/rafflesia/object_artifacts/object_artifact_materialize_data.rb', line 19 def file_count @file_count end |
#files ⇒ Object
Returns the value of attribute files.
19 20 21 |
# File 'lib/rafflesia/object_artifacts/object_artifact_materialize_data.rb', line 19 def files @files end |
#manifest ⇒ Object
Returns the value of attribute manifest.
19 20 21 |
# File 'lib/rafflesia/object_artifacts/object_artifact_materialize_data.rb', line 19 def manifest @manifest end |
#metrics ⇒ Object
Returns the value of attribute metrics.
19 20 21 |
# File 'lib/rafflesia/object_artifacts/object_artifact_materialize_data.rb', line 19 def metrics @metrics end |
#target_dir ⇒ Object
Returns the value of attribute target_dir.
19 20 21 |
# File 'lib/rafflesia/object_artifacts/object_artifact_materialize_data.rb', line 19 def target_dir @target_dir end |
#total_size_bytes ⇒ Object
Returns the value of attribute total_size_bytes.
19 20 21 |
# File 'lib/rafflesia/object_artifacts/object_artifact_materialize_data.rb', line 19 def total_size_bytes @total_size_bytes end |
#verified ⇒ Object
Returns the value of attribute verified.
19 20 21 |
# File 'lib/rafflesia/object_artifacts/object_artifact_materialize_data.rb', line 19 def verified @verified end |