Class: Rafflesia::SequenceCatalogEntry

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

Constant Summary collapse

HASH_ATTRS =
{
  aliases: :aliases,
  header: :header,
  header_first_token: :header_first_token,
  length: :length,
  sequence_id: :sequence_id,
  sha256: :sha_256
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ SequenceCatalogEntry

Returns a new instance of SequenceCatalogEntry.



25
26
27
28
29
30
31
32
33
34
# File 'lib/rafflesia/sequences/sequence_catalog_entry.rb', line 25

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @aliases = (hash[:aliases] || [])
  @header = hash[:header]
  @header_first_token = hash[:header_first_token]
  @length = hash[:length]
  @sequence_id = hash[:sequence_id]
  @sha_256 = hash[:sha256]
end

Instance Attribute Details

#aliasesObject

Returns the value of attribute aliases.



17
18
19
# File 'lib/rafflesia/sequences/sequence_catalog_entry.rb', line 17

def aliases
  @aliases
end

#headerObject

Returns the value of attribute header.



17
18
19
# File 'lib/rafflesia/sequences/sequence_catalog_entry.rb', line 17

def header
  @header
end

#header_first_tokenObject

Returns the value of attribute header_first_token.



17
18
19
# File 'lib/rafflesia/sequences/sequence_catalog_entry.rb', line 17

def header_first_token
  @header_first_token
end

#lengthObject

Returns the value of attribute length.



17
18
19
# File 'lib/rafflesia/sequences/sequence_catalog_entry.rb', line 17

def length
  @length
end

#sequence_idObject

Returns the value of attribute sequence_id.



17
18
19
# File 'lib/rafflesia/sequences/sequence_catalog_entry.rb', line 17

def sequence_id
  @sequence_id
end

#sha_256Object

Returns the value of attribute sha_256.



17
18
19
# File 'lib/rafflesia/sequences/sequence_catalog_entry.rb', line 17

def sha_256
  @sha_256
end