Class: Rafflesia::PocketFeaturesData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::PocketFeaturesData
- Defined in:
- lib/rafflesia/proteins/pocket_features_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ pocket: :pocket, relation: :relation }.freeze
Instance Attribute Summary collapse
-
#pocket ⇒ Object
Returns the value of attribute pocket.
-
#relation ⇒ Object
Returns the value of attribute relation.
Instance Method Summary collapse
-
#initialize(json) ⇒ PocketFeaturesData
constructor
A new instance of PocketFeaturesData.
Constructor Details
#initialize(json) ⇒ PocketFeaturesData
Returns a new instance of PocketFeaturesData.
17 18 19 20 21 22 |
# File 'lib/rafflesia/proteins/pocket_features_data.rb', line 17 def initialize(json) super() hash = self.class.normalize(json) @pocket = hash[:pocket] ? Rafflesia::Pocket.new(hash[:pocket]) : nil @relation = hash[:relation] ? Rafflesia::RelationArtifactData.new(hash[:relation]) : nil end |
Instance Attribute Details
#pocket ⇒ Object
Returns the value of attribute pocket.
13 14 15 |
# File 'lib/rafflesia/proteins/pocket_features_data.rb', line 13 def pocket @pocket end |
#relation ⇒ Object
Returns the value of attribute relation.
13 14 15 |
# File 'lib/rafflesia/proteins/pocket_features_data.rb', line 13 def relation @relation end |