Class: Rafflesia::DiamondDbMaterializeData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::DiamondDbMaterializeData
- Defined in:
- lib/rafflesia/sequences/diamond_db_materialize_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ all_cache_hits: :all_cache_hits, db_prefix: :db_prefix, file_count: :file_count, files: :files, manifest_id: :manifest_id, manifest_path: :manifest_path, metrics: :metrics, ref: :ref, 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.
-
#db_prefix ⇒ Object
Returns the value of attribute db_prefix.
-
#file_count ⇒ Object
Returns the value of attribute file_count.
-
#files ⇒ Object
Returns the value of attribute files.
-
#manifest_id ⇒ Object
Returns the value of attribute manifest_id.
-
#manifest_path ⇒ Object
Returns the value of attribute manifest_path.
-
#metrics ⇒ Object
Returns the value of attribute metrics.
-
#ref ⇒ Object
Returns the value of attribute ref.
-
#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) ⇒ DiamondDbMaterializeData
constructor
A new instance of DiamondDbMaterializeData.
Constructor Details
#initialize(json) ⇒ DiamondDbMaterializeData
Returns a new instance of DiamondDbMaterializeData.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/rafflesia/sequences/diamond_db_materialize_data.rb', line 35 def initialize(json) super() hash = self.class.normalize(json) @all_cache_hits = hash[:all_cache_hits] @db_prefix = hash[:db_prefix] @file_count = hash[:file_count] @files = (hash[:files] || []).map { |item| item ? Rafflesia::DiamondDbMaterializedFile.new(item) : nil } @manifest_id = hash[:manifest_id] @manifest_path = hash[:manifest_path] @metrics = hash[:metrics] ? Rafflesia::CacheMaterializationMetrics.new(hash[:metrics]) : nil @ref = hash[:ref] @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.
22 23 24 |
# File 'lib/rafflesia/sequences/diamond_db_materialize_data.rb', line 22 def all_cache_hits @all_cache_hits end |
#db_prefix ⇒ Object
Returns the value of attribute db_prefix.
22 23 24 |
# File 'lib/rafflesia/sequences/diamond_db_materialize_data.rb', line 22 def db_prefix @db_prefix end |
#file_count ⇒ Object
Returns the value of attribute file_count.
22 23 24 |
# File 'lib/rafflesia/sequences/diamond_db_materialize_data.rb', line 22 def file_count @file_count end |
#files ⇒ Object
Returns the value of attribute files.
22 23 24 |
# File 'lib/rafflesia/sequences/diamond_db_materialize_data.rb', line 22 def files @files end |
#manifest_id ⇒ Object
Returns the value of attribute manifest_id.
22 23 24 |
# File 'lib/rafflesia/sequences/diamond_db_materialize_data.rb', line 22 def manifest_id @manifest_id end |
#manifest_path ⇒ Object
Returns the value of attribute manifest_path.
22 23 24 |
# File 'lib/rafflesia/sequences/diamond_db_materialize_data.rb', line 22 def manifest_path @manifest_path end |
#metrics ⇒ Object
Returns the value of attribute metrics.
22 23 24 |
# File 'lib/rafflesia/sequences/diamond_db_materialize_data.rb', line 22 def metrics @metrics end |
#ref ⇒ Object
Returns the value of attribute ref.
22 23 24 |
# File 'lib/rafflesia/sequences/diamond_db_materialize_data.rb', line 22 def ref @ref end |
#target_dir ⇒ Object
Returns the value of attribute target_dir.
22 23 24 |
# File 'lib/rafflesia/sequences/diamond_db_materialize_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/sequences/diamond_db_materialize_data.rb', line 22 def total_size_bytes @total_size_bytes end |
#verified ⇒ Object
Returns the value of attribute verified.
22 23 24 |
# File 'lib/rafflesia/sequences/diamond_db_materialize_data.rb', line 22 def verified @verified end |