Class: Rafflesia::StructureChainExtractData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::StructureChainExtractData
- 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
-
#chain ⇒ Object
Returns the value of attribute chain.
-
#chain_id ⇒ Object
Returns the value of attribute chain_id.
-
#extracted_structure ⇒ Object
Returns the value of attribute extracted_structure.
-
#parent_structure_id ⇒ Object
Returns the value of attribute parent_structure_id.
Instance Method Summary collapse
-
#initialize(json) ⇒ StructureChainExtractData
constructor
A new instance of StructureChainExtractData.
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
#chain ⇒ Object
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_id ⇒ Object
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_structure ⇒ Object
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_id ⇒ Object
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 |