Class: Rafflesia::ObjectArtifactCacheEvictData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::ObjectArtifactCacheEvictData
- Defined in:
- lib/rafflesia/object_artifacts/object_artifact_cache_evict_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ dry_run: :dry_run, manifest: :manifest, max_bytes: :max_bytes, missing_count: :missing_count, policy: :policy, remaining_size_bytes: :remaining_size_bytes, removed_count: :removed_count, removed_paths: :removed_paths, selected_size_bytes: :selected_size_bytes, target_dir: :target_dir, total_size_bytes: :total_size_bytes }.freeze
Instance Attribute Summary collapse
-
#dry_run ⇒ Object
Returns the value of attribute dry_run.
-
#manifest ⇒ Object
Returns the value of attribute manifest.
-
#max_bytes ⇒ Object
Returns the value of attribute max_bytes.
-
#missing_count ⇒ Object
Returns the value of attribute missing_count.
-
#policy ⇒ Object
Returns the value of attribute policy.
-
#remaining_size_bytes ⇒ Object
Returns the value of attribute remaining_size_bytes.
-
#removed_count ⇒ Object
Returns the value of attribute removed_count.
-
#removed_paths ⇒ Object
Returns the value of attribute removed_paths.
-
#selected_size_bytes ⇒ Object
Returns the value of attribute selected_size_bytes.
-
#target_dir ⇒ Object
Returns the value of attribute target_dir.
-
#total_size_bytes ⇒ Object
Returns the value of attribute total_size_bytes.
Instance Method Summary collapse
-
#initialize(json) ⇒ ObjectArtifactCacheEvictData
constructor
A new instance of ObjectArtifactCacheEvictData.
Constructor Details
#initialize(json) ⇒ ObjectArtifactCacheEvictData
Returns a new instance of ObjectArtifactCacheEvictData.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_evict_data.rb', line 35 def initialize(json) super() hash = self.class.normalize(json) @dry_run = hash[:dry_run] @manifest = hash[:manifest] ? Rafflesia::ObjectArtifactManifestSummary.new(hash[:manifest]) : nil @max_bytes = hash[:max_bytes] @missing_count = hash[:missing_count] @policy = hash[:policy] ? Rafflesia::CacheEvictionPolicy.new(hash[:policy]) : nil @remaining_size_bytes = hash[:remaining_size_bytes] @removed_count = hash[:removed_count] @removed_paths = (hash[:removed_paths] || []) @selected_size_bytes = hash[:selected_size_bytes] @target_dir = hash[:target_dir] @total_size_bytes = hash[:total_size_bytes] end |
Instance Attribute Details
#dry_run ⇒ Object
Returns the value of attribute dry_run.
22 23 24 |
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_evict_data.rb', line 22 def dry_run @dry_run end |
#manifest ⇒ Object
Returns the value of attribute manifest.
22 23 24 |
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_evict_data.rb', line 22 def manifest @manifest end |
#max_bytes ⇒ Object
Returns the value of attribute max_bytes.
22 23 24 |
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_evict_data.rb', line 22 def max_bytes @max_bytes end |
#missing_count ⇒ Object
Returns the value of attribute missing_count.
22 23 24 |
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_evict_data.rb', line 22 def missing_count @missing_count end |
#policy ⇒ Object
Returns the value of attribute policy.
22 23 24 |
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_evict_data.rb', line 22 def policy @policy end |
#remaining_size_bytes ⇒ Object
Returns the value of attribute remaining_size_bytes.
22 23 24 |
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_evict_data.rb', line 22 def remaining_size_bytes @remaining_size_bytes end |
#removed_count ⇒ Object
Returns the value of attribute removed_count.
22 23 24 |
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_evict_data.rb', line 22 def removed_count @removed_count end |
#removed_paths ⇒ Object
Returns the value of attribute removed_paths.
22 23 24 |
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_evict_data.rb', line 22 def removed_paths @removed_paths end |
#selected_size_bytes ⇒ Object
Returns the value of attribute selected_size_bytes.
22 23 24 |
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_evict_data.rb', line 22 def selected_size_bytes @selected_size_bytes end |
#target_dir ⇒ Object
Returns the value of attribute target_dir.
22 23 24 |
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_evict_data.rb', line 22 def target_dir @target_dir end |
#total_size_bytes ⇒ Object
Returns the value of attribute total_size_bytes.
22 23 24 |
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_evict_data.rb', line 22 def total_size_bytes @total_size_bytes end |