Class: Rafflesia::ObjectArtifactCacheInspectData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::ObjectArtifactCacheInspectData
- Defined in:
- lib/rafflesia/object_artifacts/object_artifact_cache_inspect_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ error_count: :error_count, file_count: :file_count, files: :files, manifest: :manifest, mismatched_count: :mismatched_count, missing_count: :missing_count, stale_count: :stale_count, target_dir: :target_dir, total_size_bytes: :total_size_bytes, verified_count: :verified_count }.freeze
Instance Attribute Summary collapse
-
#error_count ⇒ Object
Returns the value of attribute error_count.
-
#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.
-
#mismatched_count ⇒ Object
Returns the value of attribute mismatched_count.
-
#missing_count ⇒ Object
Returns the value of attribute missing_count.
-
#stale_count ⇒ Object
Returns the value of attribute stale_count.
-
#target_dir ⇒ Object
Returns the value of attribute target_dir.
-
#total_size_bytes ⇒ Object
Returns the value of attribute total_size_bytes.
-
#verified_count ⇒ Object
Returns the value of attribute verified_count.
Instance Method Summary collapse
-
#initialize(json) ⇒ ObjectArtifactCacheInspectData
constructor
A new instance of ObjectArtifactCacheInspectData.
Constructor Details
#initialize(json) ⇒ ObjectArtifactCacheInspectData
Returns a new instance of ObjectArtifactCacheInspectData.
33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_inspect_data.rb', line 33 def initialize(json) super() hash = self.class.normalize(json) @error_count = hash[:error_count] @file_count = hash[:file_count] @files = (hash[:files] || []).map { |item| item ? Rafflesia::ObjectArtifactCacheFileState.new(item) : nil } @manifest = hash[:manifest] ? Rafflesia::ObjectArtifactManifestSummary.new(hash[:manifest]) : nil @mismatched_count = hash[:mismatched_count] @missing_count = hash[:missing_count] @stale_count = hash[:stale_count] @target_dir = hash[:target_dir] @total_size_bytes = hash[:total_size_bytes] @verified_count = hash[:verified_count] end |
Instance Attribute Details
#error_count ⇒ Object
Returns the value of attribute error_count.
21 22 23 |
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_inspect_data.rb', line 21 def error_count @error_count end |
#file_count ⇒ Object
Returns the value of attribute file_count.
21 22 23 |
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_inspect_data.rb', line 21 def file_count @file_count end |
#files ⇒ Object
Returns the value of attribute files.
21 22 23 |
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_inspect_data.rb', line 21 def files @files end |
#manifest ⇒ Object
Returns the value of attribute manifest.
21 22 23 |
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_inspect_data.rb', line 21 def manifest @manifest end |
#mismatched_count ⇒ Object
Returns the value of attribute mismatched_count.
21 22 23 |
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_inspect_data.rb', line 21 def mismatched_count @mismatched_count end |
#missing_count ⇒ Object
Returns the value of attribute missing_count.
21 22 23 |
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_inspect_data.rb', line 21 def missing_count @missing_count end |
#stale_count ⇒ Object
Returns the value of attribute stale_count.
21 22 23 |
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_inspect_data.rb', line 21 def stale_count @stale_count end |
#target_dir ⇒ Object
Returns the value of attribute target_dir.
21 22 23 |
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_inspect_data.rb', line 21 def target_dir @target_dir end |
#total_size_bytes ⇒ Object
Returns the value of attribute total_size_bytes.
21 22 23 |
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_inspect_data.rb', line 21 def total_size_bytes @total_size_bytes end |
#verified_count ⇒ Object
Returns the value of attribute verified_count.
21 22 23 |
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_inspect_data.rb', line 21 def verified_count @verified_count end |