Class: Rafflesia::BlastDbMaterializeData

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/sequences/blast_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,
  index_format: :index_format,
  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

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ BlastDbMaterializeData

Returns a new instance of BlastDbMaterializeData.



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/rafflesia/sequences/blast_db_materialize_data.rb', line 37

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::BlastDbMaterializedFile.new(item) : nil }
  @index_format = hash[:index_format]
  @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_hitsObject

Returns the value of attribute all_cache_hits.



23
24
25
# File 'lib/rafflesia/sequences/blast_db_materialize_data.rb', line 23

def all_cache_hits
  @all_cache_hits
end

#db_prefixObject

Returns the value of attribute db_prefix.



23
24
25
# File 'lib/rafflesia/sequences/blast_db_materialize_data.rb', line 23

def db_prefix
  @db_prefix
end

#file_countObject

Returns the value of attribute file_count.



23
24
25
# File 'lib/rafflesia/sequences/blast_db_materialize_data.rb', line 23

def file_count
  @file_count
end

#filesObject

Returns the value of attribute files.



23
24
25
# File 'lib/rafflesia/sequences/blast_db_materialize_data.rb', line 23

def files
  @files
end

#index_formatObject

Returns the value of attribute index_format.



23
24
25
# File 'lib/rafflesia/sequences/blast_db_materialize_data.rb', line 23

def index_format
  @index_format
end

#manifest_idObject

Returns the value of attribute manifest_id.



23
24
25
# File 'lib/rafflesia/sequences/blast_db_materialize_data.rb', line 23

def manifest_id
  @manifest_id
end

#manifest_pathObject

Returns the value of attribute manifest_path.



23
24
25
# File 'lib/rafflesia/sequences/blast_db_materialize_data.rb', line 23

def manifest_path
  @manifest_path
end

#metricsObject

Returns the value of attribute metrics.



23
24
25
# File 'lib/rafflesia/sequences/blast_db_materialize_data.rb', line 23

def metrics
  @metrics
end

#refObject

Returns the value of attribute ref.



23
24
25
# File 'lib/rafflesia/sequences/blast_db_materialize_data.rb', line 23

def ref
  @ref
end

#target_dirObject

Returns the value of attribute target_dir.



23
24
25
# File 'lib/rafflesia/sequences/blast_db_materialize_data.rb', line 23

def target_dir
  @target_dir
end

#total_size_bytesObject

Returns the value of attribute total_size_bytes.



23
24
25
# File 'lib/rafflesia/sequences/blast_db_materialize_data.rb', line 23

def total_size_bytes
  @total_size_bytes
end

#verifiedObject

Returns the value of attribute verified.



23
24
25
# File 'lib/rafflesia/sequences/blast_db_materialize_data.rb', line 23

def verified
  @verified
end