Class: Rafflesia::SequenceCatalogEntry
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::SequenceCatalogEntry
- 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
-
#aliases ⇒ Object
Returns the value of attribute aliases.
-
#header ⇒ Object
Returns the value of attribute header.
-
#header_first_token ⇒ Object
Returns the value of attribute header_first_token.
-
#length ⇒ Object
Returns the value of attribute length.
-
#sequence_id ⇒ Object
Returns the value of attribute sequence_id.
-
#sha_256 ⇒ Object
Returns the value of attribute sha_256.
Instance Method Summary collapse
-
#initialize(json) ⇒ SequenceCatalogEntry
constructor
A new instance of SequenceCatalogEntry.
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
#aliases ⇒ Object
Returns the value of attribute aliases.
17 18 19 |
# File 'lib/rafflesia/sequences/sequence_catalog_entry.rb', line 17 def aliases @aliases end |
#header ⇒ Object
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_token ⇒ Object
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 |
#length ⇒ Object
Returns the value of attribute length.
17 18 19 |
# File 'lib/rafflesia/sequences/sequence_catalog_entry.rb', line 17 def length @length end |
#sequence_id ⇒ Object
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_256 ⇒ Object
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 |