Class: Rafflesia::GenomeContig
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::GenomeContig
- Defined in:
- lib/rafflesia/genomes/genome_contig.rb
Constant Summary collapse
- HASH_ATTRS =
{ aliases: :aliases, length_bp: :length_bp, name: :name, role: :role }.freeze
Instance Attribute Summary collapse
-
#aliases ⇒ Object
Returns the value of attribute aliases.
-
#length_bp ⇒ Object
Returns the value of attribute length_bp.
-
#name ⇒ Object
Returns the value of attribute name.
-
#role ⇒ Object
Returns the value of attribute role.
Instance Method Summary collapse
-
#initialize(json) ⇒ GenomeContig
constructor
A new instance of GenomeContig.
Constructor Details
#initialize(json) ⇒ GenomeContig
Returns a new instance of GenomeContig.
21 22 23 24 25 26 27 28 |
# File 'lib/rafflesia/genomes/genome_contig.rb', line 21 def initialize(json) super() hash = self.class.normalize(json) @aliases = (hash[:aliases] || []) @length_bp = hash[:length_bp] @name = hash[:name] @role = hash[:role] end |
Instance Attribute Details
#aliases ⇒ Object
Returns the value of attribute aliases.
15 16 17 |
# File 'lib/rafflesia/genomes/genome_contig.rb', line 15 def aliases @aliases end |
#length_bp ⇒ Object
Returns the value of attribute length_bp.
15 16 17 |
# File 'lib/rafflesia/genomes/genome_contig.rb', line 15 def length_bp @length_bp end |
#name ⇒ Object
Returns the value of attribute name.
15 16 17 |
# File 'lib/rafflesia/genomes/genome_contig.rb', line 15 def name @name end |
#role ⇒ Object
Returns the value of attribute role.
15 16 17 |
# File 'lib/rafflesia/genomes/genome_contig.rb', line 15 def role @role end |