Class: Rafflesia::VariantFeaturesData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::VariantFeaturesData
- Defined in:
- lib/rafflesia/proteins/variant_features_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ features_computed: :features_computed, features_requested: :features_requested, relation: :relation, structure_id: :structure_id, variants: :variants }.freeze
Instance Attribute Summary collapse
-
#features_computed ⇒ Object
Returns the value of attribute features_computed.
-
#features_requested ⇒ Object
Returns the value of attribute features_requested.
-
#relation ⇒ Object
Returns the value of attribute relation.
-
#structure_id ⇒ Object
Returns the value of attribute structure_id.
-
#variants ⇒ Object
Returns the value of attribute variants.
Instance Method Summary collapse
-
#initialize(json) ⇒ VariantFeaturesData
constructor
A new instance of VariantFeaturesData.
Constructor Details
#initialize(json) ⇒ VariantFeaturesData
Returns a new instance of VariantFeaturesData.
23 24 25 26 27 28 29 30 31 |
# File 'lib/rafflesia/proteins/variant_features_data.rb', line 23 def initialize(json) super() hash = self.class.normalize(json) @features_computed = (hash[:features_computed] || []) @features_requested = (hash[:features_requested] || []) @relation = hash[:relation] ? Rafflesia::RelationArtifactData.new(hash[:relation]) : nil @structure_id = hash[:structure_id] @variants = (hash[:variants] || []).map { |item| item ? Rafflesia::VariantFeature.new(item) : nil } end |
Instance Attribute Details
#features_computed ⇒ Object
Returns the value of attribute features_computed.
16 17 18 |
# File 'lib/rafflesia/proteins/variant_features_data.rb', line 16 def features_computed @features_computed end |
#features_requested ⇒ Object
Returns the value of attribute features_requested.
16 17 18 |
# File 'lib/rafflesia/proteins/variant_features_data.rb', line 16 def features_requested @features_requested end |
#relation ⇒ Object
Returns the value of attribute relation.
16 17 18 |
# File 'lib/rafflesia/proteins/variant_features_data.rb', line 16 def relation @relation end |
#structure_id ⇒ Object
Returns the value of attribute structure_id.
16 17 18 |
# File 'lib/rafflesia/proteins/variant_features_data.rb', line 16 def structure_id @structure_id end |
#variants ⇒ Object
Returns the value of attribute variants.
16 17 18 |
# File 'lib/rafflesia/proteins/variant_features_data.rb', line 16 def variants @variants end |