Class: Rafflesia::PocketFeaturesData

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/proteins/pocket_features_data.rb

Constant Summary collapse

HASH_ATTRS =
{
  pocket: :pocket,
  relation: :relation
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#pocketObject

Returns the value of attribute pocket.



13
14
15
# File 'lib/rafflesia/proteins/pocket_features_data.rb', line 13

def pocket
  @pocket
end

#relationObject

Returns the value of attribute relation.



13
14
15
# File 'lib/rafflesia/proteins/pocket_features_data.rb', line 13

def relation
  @relation
end