Class: Rafflesia::VariantMapGenomicData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::VariantMapGenomicData
- Defined in:
- lib/rafflesia/genomes/variant_map_genomic_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ assembly: :assembly, mappings: :mappings, relation: :relation, to: :to }.freeze
Instance Attribute Summary collapse
-
#assembly ⇒ Object
Returns the value of attribute assembly.
-
#mappings ⇒ Object
Returns the value of attribute mappings.
-
#relation ⇒ Object
Returns the value of attribute relation.
-
#to ⇒ Object
Returns the value of attribute to.
Instance Method Summary collapse
-
#initialize(json) ⇒ VariantMapGenomicData
constructor
A new instance of VariantMapGenomicData.
Constructor Details
#initialize(json) ⇒ VariantMapGenomicData
Returns a new instance of VariantMapGenomicData.
21 22 23 24 25 26 27 28 |
# File 'lib/rafflesia/genomes/variant_map_genomic_data.rb', line 21 def initialize(json) super() hash = self.class.normalize(json) @assembly = hash[:assembly] @mappings = (hash[:mappings] || []).map { |item| item ? Rafflesia::VariantGenomicMapping.new(item) : nil } @relation = hash[:relation] ? Rafflesia::RelationArtifactData.new(hash[:relation]) : nil @to = hash[:to] end |
Instance Attribute Details
#assembly ⇒ Object
Returns the value of attribute assembly.
15 16 17 |
# File 'lib/rafflesia/genomes/variant_map_genomic_data.rb', line 15 def assembly @assembly end |
#mappings ⇒ Object
Returns the value of attribute mappings.
15 16 17 |
# File 'lib/rafflesia/genomes/variant_map_genomic_data.rb', line 15 def mappings @mappings end |
#relation ⇒ Object
Returns the value of attribute relation.
15 16 17 |
# File 'lib/rafflesia/genomes/variant_map_genomic_data.rb', line 15 def relation @relation end |
#to ⇒ Object
Returns the value of attribute to.
15 16 17 |
# File 'lib/rafflesia/genomes/variant_map_genomic_data.rb', line 15 def to @to end |