Class: Rafflesia::StructureChainExtractData

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

Constant Summary collapse

HASH_ATTRS =
{
  chain: :chain,
  chain_id: :chain_id,
  extracted_structure: :extracted_structure,
  parent_structure_id: :parent_structure_id
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ StructureChainExtractData

Returns a new instance of StructureChainExtractData.



21
22
23
24
25
26
27
28
# File 'lib/rafflesia/proteins/structure_chain_extract_data.rb', line 21

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @chain = hash[:chain] ? Rafflesia::StructureChainRecord.new(hash[:chain]) : nil
  @chain_id = hash[:chain_id]
  @extracted_structure = hash[:extracted_structure] ? Rafflesia::StructureData.new(hash[:extracted_structure]) : nil
  @parent_structure_id = hash[:parent_structure_id]
end

Instance Attribute Details

#chainObject

Returns the value of attribute chain.



15
16
17
# File 'lib/rafflesia/proteins/structure_chain_extract_data.rb', line 15

def chain
  @chain
end

#chain_idObject

Returns the value of attribute chain_id.



15
16
17
# File 'lib/rafflesia/proteins/structure_chain_extract_data.rb', line 15

def chain_id
  @chain_id
end

#extracted_structureObject

Returns the value of attribute extracted_structure.



15
16
17
# File 'lib/rafflesia/proteins/structure_chain_extract_data.rb', line 15

def extracted_structure
  @extracted_structure
end

#parent_structure_idObject

Returns the value of attribute parent_structure_id.



15
16
17
# File 'lib/rafflesia/proteins/structure_chain_extract_data.rb', line 15

def parent_structure_id
  @parent_structure_id
end