Class: Rafflesia::DiamondDbManifest

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

Constant Summary collapse

HASH_ATTRS =
{
  build_command: :build_command,
  created_at: :created_at,
  database: :database,
  db_id: :db_id,
  db_prefix: :db_prefix,
  engine: :engine,
  engine_version: :engine_version,
  manifest_id: :manifest_id,
  manifest_version: :manifest_version,
  name: :name,
  parameters: :parameters,
  source_fasta: :source_fasta,
  version: :version
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ DiamondDbManifest

Returns a new instance of DiamondDbManifest.



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

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @build_command = (hash[:build_command] || [])
  @created_at = hash[:created_at]
  @database = hash[:database] ? Rafflesia::DiamondDbArtifact.new(hash[:database]) : nil
  @db_id = hash[:db_id]
  @db_prefix = hash[:db_prefix]
  @engine = hash[:engine]
  @engine_version = hash[:engine_version]
  @manifest_id = hash[:manifest_id]
  @manifest_version = hash[:manifest_version]
  @name = hash[:name]
  @parameters = hash[:parameters] || {}
  @source_fasta = hash[:source_fasta] ? Rafflesia::DiamondDbArtifact.new(hash[:source_fasta]) : nil
  @version = hash[:version]
end

Instance Attribute Details

#build_commandObject

Returns the value of attribute build_command.



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

def build_command
  @build_command
end

#created_atObject

Returns the value of attribute created_at.



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

def created_at
  @created_at
end

#databaseObject

Returns the value of attribute database.



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

def database
  @database
end

#db_idObject

Returns the value of attribute db_id.



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

def db_id
  @db_id
end

#db_prefixObject

Returns the value of attribute db_prefix.



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

def db_prefix
  @db_prefix
end

#engineObject

Returns the value of attribute engine.



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

def engine
  @engine
end

#engine_versionObject

Returns the value of attribute engine_version.



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

def engine_version
  @engine_version
end

#manifest_idObject

Returns the value of attribute manifest_id.



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

def manifest_id
  @manifest_id
end

#manifest_versionObject

Returns the value of attribute manifest_version.



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

def manifest_version
  @manifest_version
end

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

#parametersObject

Returns the value of attribute parameters.



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

def parameters
  @parameters
end

#source_fastaObject

Returns the value of attribute source_fasta.



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

def source_fasta
  @source_fasta
end

#versionObject

Returns the value of attribute version.



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

def version
  @version
end