Class: Rafflesia::BlastDbBuildData

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

Constant Summary collapse

HASH_ATTRS =
{
  artifact_count: :artifact_count,
  command: :command,
  dry_run: :dry_run,
  index_format: :index_format,
  manifest: :manifest,
  manifest_object: :manifest_object,
  manifest_path: :manifest_path,
  molecule: :molecule,
  name: :name,
  published: :published,
  ref: :ref,
  total_size_bytes: :total_size_bytes,
  version: :version
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ BlastDbBuildData

Returns a new instance of BlastDbBuildData.



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/rafflesia/sequences/blast_db_build_data.rb', line 39

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @artifact_count = hash[:artifact_count]
  @command = (hash[:command] || [])
  @dry_run = hash[:dry_run]
  @index_format = hash[:index_format]
  @manifest = hash[:manifest] ? Rafflesia::BlastDbManifest.new(hash[:manifest]) : nil
  @manifest_object = hash[:manifest_object] ? Rafflesia::ObjectRef.new(hash[:manifest_object]) : nil
  @manifest_path = hash[:manifest_path]
  @molecule = hash[:molecule]
  @name = hash[:name]
  @published = hash[:published] ? Rafflesia::BlastDbPublishData.new(hash[:published]) : nil
  @ref = hash[:ref]
  @total_size_bytes = hash[:total_size_bytes]
  @version = hash[:version]
end

Instance Attribute Details

#artifact_countObject

Returns the value of attribute artifact_count.



24
25
26
# File 'lib/rafflesia/sequences/blast_db_build_data.rb', line 24

def artifact_count
  @artifact_count
end

#commandObject

Returns the value of attribute command.



24
25
26
# File 'lib/rafflesia/sequences/blast_db_build_data.rb', line 24

def command
  @command
end

#dry_runObject

Returns the value of attribute dry_run.



24
25
26
# File 'lib/rafflesia/sequences/blast_db_build_data.rb', line 24

def dry_run
  @dry_run
end

#index_formatObject

Returns the value of attribute index_format.



24
25
26
# File 'lib/rafflesia/sequences/blast_db_build_data.rb', line 24

def index_format
  @index_format
end

#manifestObject

Returns the value of attribute manifest.



24
25
26
# File 'lib/rafflesia/sequences/blast_db_build_data.rb', line 24

def manifest
  @manifest
end

#manifest_objectObject

Returns the value of attribute manifest_object.



24
25
26
# File 'lib/rafflesia/sequences/blast_db_build_data.rb', line 24

def manifest_object
  @manifest_object
end

#manifest_pathObject

Returns the value of attribute manifest_path.



24
25
26
# File 'lib/rafflesia/sequences/blast_db_build_data.rb', line 24

def manifest_path
  @manifest_path
end

#moleculeObject

Returns the value of attribute molecule.



24
25
26
# File 'lib/rafflesia/sequences/blast_db_build_data.rb', line 24

def molecule
  @molecule
end

#nameObject

Returns the value of attribute name.



24
25
26
# File 'lib/rafflesia/sequences/blast_db_build_data.rb', line 24

def name
  @name
end

#publishedObject

Returns the value of attribute published.



24
25
26
# File 'lib/rafflesia/sequences/blast_db_build_data.rb', line 24

def published
  @published
end

#refObject

Returns the value of attribute ref.



24
25
26
# File 'lib/rafflesia/sequences/blast_db_build_data.rb', line 24

def ref
  @ref
end

#total_size_bytesObject

Returns the value of attribute total_size_bytes.



24
25
26
# File 'lib/rafflesia/sequences/blast_db_build_data.rb', line 24

def total_size_bytes
  @total_size_bytes
end

#versionObject

Returns the value of attribute version.



24
25
26
# File 'lib/rafflesia/sequences/blast_db_build_data.rb', line 24

def version
  @version
end