Class: Rafflesia::StructureChainRecord
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::StructureChainRecord
- Defined in:
- lib/rafflesia/proteins/structure_chain_record.rb
Constant Summary collapse
- HASH_ATTRS =
{ atom_count: :atom_count, auth_chain_id: :auth_chain_id, chain_id: :chain_id, end: :end, entity_description: :entity_description, entity_id: :entity_id, entity_type: :entity_type, label_chain_id: :label_chain_id, residue_count: :residue_count, start: :start, uniprot_ids: :uniprot_ids }.freeze
Instance Attribute Summary collapse
-
#atom_count ⇒ Object
Returns the value of attribute atom_count.
-
#auth_chain_id ⇒ Object
Returns the value of attribute auth_chain_id.
-
#chain_id ⇒ Object
Returns the value of attribute chain_id.
-
#end ⇒ Object
Returns the value of attribute end.
-
#entity_description ⇒ Object
Returns the value of attribute entity_description.
-
#entity_id ⇒ Object
Returns the value of attribute entity_id.
-
#entity_type ⇒ Object
Returns the value of attribute entity_type.
-
#label_chain_id ⇒ Object
Returns the value of attribute label_chain_id.
-
#residue_count ⇒ Object
Returns the value of attribute residue_count.
-
#start ⇒ Object
Returns the value of attribute start.
-
#uniprot_ids ⇒ Object
Returns the value of attribute uniprot_ids.
Instance Method Summary collapse
-
#initialize(json) ⇒ StructureChainRecord
constructor
A new instance of StructureChainRecord.
Constructor Details
#initialize(json) ⇒ StructureChainRecord
Returns a new instance of StructureChainRecord.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/rafflesia/proteins/structure_chain_record.rb', line 35 def initialize(json) super() hash = self.class.normalize(json) @atom_count = hash[:atom_count] @auth_chain_id = hash[:auth_chain_id] @chain_id = hash[:chain_id] @end = hash[:end] @entity_description = hash[:entity_description] @entity_id = hash[:entity_id] @entity_type = hash[:entity_type] @label_chain_id = hash[:label_chain_id] @residue_count = hash[:residue_count] @start = hash[:start] @uniprot_ids = (hash[:uniprot_ids] || []) end |
Instance Attribute Details
#atom_count ⇒ Object
Returns the value of attribute atom_count.
22 23 24 |
# File 'lib/rafflesia/proteins/structure_chain_record.rb', line 22 def atom_count @atom_count end |
#auth_chain_id ⇒ Object
Returns the value of attribute auth_chain_id.
22 23 24 |
# File 'lib/rafflesia/proteins/structure_chain_record.rb', line 22 def auth_chain_id @auth_chain_id end |
#chain_id ⇒ Object
Returns the value of attribute chain_id.
22 23 24 |
# File 'lib/rafflesia/proteins/structure_chain_record.rb', line 22 def chain_id @chain_id end |
#end ⇒ Object
Returns the value of attribute end.
22 23 24 |
# File 'lib/rafflesia/proteins/structure_chain_record.rb', line 22 def end @end end |
#entity_description ⇒ Object
Returns the value of attribute entity_description.
22 23 24 |
# File 'lib/rafflesia/proteins/structure_chain_record.rb', line 22 def entity_description @entity_description end |
#entity_id ⇒ Object
Returns the value of attribute entity_id.
22 23 24 |
# File 'lib/rafflesia/proteins/structure_chain_record.rb', line 22 def entity_id @entity_id end |
#entity_type ⇒ Object
Returns the value of attribute entity_type.
22 23 24 |
# File 'lib/rafflesia/proteins/structure_chain_record.rb', line 22 def entity_type @entity_type end |
#label_chain_id ⇒ Object
Returns the value of attribute label_chain_id.
22 23 24 |
# File 'lib/rafflesia/proteins/structure_chain_record.rb', line 22 def label_chain_id @label_chain_id end |
#residue_count ⇒ Object
Returns the value of attribute residue_count.
22 23 24 |
# File 'lib/rafflesia/proteins/structure_chain_record.rb', line 22 def residue_count @residue_count end |
#start ⇒ Object
Returns the value of attribute start.
22 23 24 |
# File 'lib/rafflesia/proteins/structure_chain_record.rb', line 22 def start @start end |
#uniprot_ids ⇒ Object
Returns the value of attribute uniprot_ids.
22 23 24 |
# File 'lib/rafflesia/proteins/structure_chain_record.rb', line 22 def uniprot_ids @uniprot_ids end |