Class: Rafflesia::BlastDbVerifyData

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/sequences/blast_db_verify_data.rb

Constant Summary collapse

HASH_ATTRS =
{
  artifact_count: :artifact_count,
  artifacts: :artifacts,
  failure_count: :failure_count,
  manifest_id: :manifest_id,
  manifest_path: :manifest_path,
  ref: :ref,
  target_dir: :target_dir,
  verified: :verified
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ BlastDbVerifyData

Returns a new instance of BlastDbVerifyData.



29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/rafflesia/sequences/blast_db_verify_data.rb', line 29

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @artifact_count = hash[:artifact_count]
  @artifacts = (hash[:artifacts] || []).map { |item| item ? Rafflesia::BlastDbArtifactState.new(item) : nil }
  @failure_count = hash[:failure_count]
  @manifest_id = hash[:manifest_id]
  @manifest_path = hash[:manifest_path]
  @ref = hash[:ref]
  @target_dir = hash[:target_dir]
  @verified = hash[:verified]
end

Instance Attribute Details

#artifact_countObject

Returns the value of attribute artifact_count.



19
20
21
# File 'lib/rafflesia/sequences/blast_db_verify_data.rb', line 19

def artifact_count
  @artifact_count
end

#artifactsObject

Returns the value of attribute artifacts.



19
20
21
# File 'lib/rafflesia/sequences/blast_db_verify_data.rb', line 19

def artifacts
  @artifacts
end

#failure_countObject

Returns the value of attribute failure_count.



19
20
21
# File 'lib/rafflesia/sequences/blast_db_verify_data.rb', line 19

def failure_count
  @failure_count
end

#manifest_idObject

Returns the value of attribute manifest_id.



19
20
21
# File 'lib/rafflesia/sequences/blast_db_verify_data.rb', line 19

def manifest_id
  @manifest_id
end

#manifest_pathObject

Returns the value of attribute manifest_path.



19
20
21
# File 'lib/rafflesia/sequences/blast_db_verify_data.rb', line 19

def manifest_path
  @manifest_path
end

#refObject

Returns the value of attribute ref.



19
20
21
# File 'lib/rafflesia/sequences/blast_db_verify_data.rb', line 19

def ref
  @ref
end

#target_dirObject

Returns the value of attribute target_dir.



19
20
21
# File 'lib/rafflesia/sequences/blast_db_verify_data.rb', line 19

def target_dir
  @target_dir
end

#verifiedObject

Returns the value of attribute verified.



19
20
21
# File 'lib/rafflesia/sequences/blast_db_verify_data.rb', line 19

def verified
  @verified
end