Class: Rafflesia::BlastDbEvictData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::BlastDbEvictData
- Defined in:
- lib/rafflesia/sequences/blast_db_evict_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ dry_run: :dry_run, manifest_id: :manifest_id, manifest_path: :manifest_path, max_bytes: :max_bytes, policy: :policy, ref: :ref, 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_id ⇒ Object
Returns the value of attribute manifest_id.
-
#manifest_path ⇒ Object
Returns the value of attribute manifest_path.
-
#max_bytes ⇒ Object
Returns the value of attribute max_bytes.
-
#policy ⇒ Object
Returns the value of attribute policy.
-
#ref ⇒ Object
Returns the value of attribute ref.
-
#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) ⇒ BlastDbEvictData
constructor
A new instance of BlastDbEvictData.
Constructor Details
#initialize(json) ⇒ BlastDbEvictData
Returns a new instance of BlastDbEvictData.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/rafflesia/sequences/blast_db_evict_data.rb', line 37 def initialize(json) super() hash = self.class.normalize(json) @dry_run = hash[:dry_run] @manifest_id = hash[:manifest_id] @manifest_path = hash[:manifest_path] @max_bytes = hash[:max_bytes] @policy = hash[:policy] ? Rafflesia::CacheEvictionPolicy.new(hash[:policy]) : nil @ref = hash[:ref] @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.
23 24 25 |
# File 'lib/rafflesia/sequences/blast_db_evict_data.rb', line 23 def dry_run @dry_run end |
#manifest_id ⇒ Object
Returns the value of attribute manifest_id.
23 24 25 |
# File 'lib/rafflesia/sequences/blast_db_evict_data.rb', line 23 def manifest_id @manifest_id end |
#manifest_path ⇒ Object
Returns the value of attribute manifest_path.
23 24 25 |
# File 'lib/rafflesia/sequences/blast_db_evict_data.rb', line 23 def manifest_path @manifest_path end |
#max_bytes ⇒ Object
Returns the value of attribute max_bytes.
23 24 25 |
# File 'lib/rafflesia/sequences/blast_db_evict_data.rb', line 23 def max_bytes @max_bytes end |
#policy ⇒ Object
Returns the value of attribute policy.
23 24 25 |
# File 'lib/rafflesia/sequences/blast_db_evict_data.rb', line 23 def policy @policy end |
#ref ⇒ Object
Returns the value of attribute ref.
23 24 25 |
# File 'lib/rafflesia/sequences/blast_db_evict_data.rb', line 23 def ref @ref end |
#remaining_size_bytes ⇒ Object
Returns the value of attribute remaining_size_bytes.
23 24 25 |
# File 'lib/rafflesia/sequences/blast_db_evict_data.rb', line 23 def remaining_size_bytes @remaining_size_bytes end |
#removed_count ⇒ Object
Returns the value of attribute removed_count.
23 24 25 |
# File 'lib/rafflesia/sequences/blast_db_evict_data.rb', line 23 def removed_count @removed_count end |
#removed_paths ⇒ Object
Returns the value of attribute removed_paths.
23 24 25 |
# File 'lib/rafflesia/sequences/blast_db_evict_data.rb', line 23 def removed_paths @removed_paths end |
#selected_size_bytes ⇒ Object
Returns the value of attribute selected_size_bytes.
23 24 25 |
# File 'lib/rafflesia/sequences/blast_db_evict_data.rb', line 23 def selected_size_bytes @selected_size_bytes end |
#target_dir ⇒ Object
Returns the value of attribute target_dir.
23 24 25 |
# File 'lib/rafflesia/sequences/blast_db_evict_data.rb', line 23 def target_dir @target_dir end |
#total_size_bytes ⇒ Object
Returns the value of attribute total_size_bytes.
23 24 25 |
# File 'lib/rafflesia/sequences/blast_db_evict_data.rb', line 23 def total_size_bytes @total_size_bytes end |