Class: Rafflesia::InterfaceBurialData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::InterfaceBurialData
- Defined in:
- lib/rafflesia/proteins/interface_burial_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ buried_surface_area_angstrom2: :buried_surface_area_angstrom_2, group1: :group_1, group2: :group_2, interface_residue_count: :interface_residue_count, residues: :residues, structure_id: :structure_id }.freeze
Instance Attribute Summary collapse
-
#buried_surface_area_angstrom_2 ⇒ Object
Returns the value of attribute buried_surface_area_angstrom_2.
-
#group_1 ⇒ Object
Returns the value of attribute group_1.
-
#group_2 ⇒ Object
Returns the value of attribute group_2.
-
#interface_residue_count ⇒ Object
Returns the value of attribute interface_residue_count.
-
#residues ⇒ Object
Returns the value of attribute residues.
-
#structure_id ⇒ Object
Returns the value of attribute structure_id.
Instance Method Summary collapse
-
#initialize(json) ⇒ InterfaceBurialData
constructor
A new instance of InterfaceBurialData.
Constructor Details
#initialize(json) ⇒ InterfaceBurialData
Returns a new instance of InterfaceBurialData.
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/rafflesia/proteins/interface_burial_data.rb', line 25 def initialize(json) super() hash = self.class.normalize(json) @buried_surface_area_angstrom_2 = hash[:buried_surface_area_angstrom2] @group_1 = (hash[:group1] || []) @group_2 = (hash[:group2] || []) @interface_residue_count = hash[:interface_residue_count] @residues = (hash[:residues] || []).map { |item| item ? Rafflesia::InterfaceBurialResidue.new(item) : nil } @structure_id = hash[:structure_id] end |
Instance Attribute Details
#buried_surface_area_angstrom_2 ⇒ Object
Returns the value of attribute buried_surface_area_angstrom_2.
17 18 19 |
# File 'lib/rafflesia/proteins/interface_burial_data.rb', line 17 def buried_surface_area_angstrom_2 @buried_surface_area_angstrom_2 end |
#group_1 ⇒ Object
Returns the value of attribute group_1.
17 18 19 |
# File 'lib/rafflesia/proteins/interface_burial_data.rb', line 17 def group_1 @group_1 end |
#group_2 ⇒ Object
Returns the value of attribute group_2.
17 18 19 |
# File 'lib/rafflesia/proteins/interface_burial_data.rb', line 17 def group_2 @group_2 end |
#interface_residue_count ⇒ Object
Returns the value of attribute interface_residue_count.
17 18 19 |
# File 'lib/rafflesia/proteins/interface_burial_data.rb', line 17 def interface_residue_count @interface_residue_count end |
#residues ⇒ Object
Returns the value of attribute residues.
17 18 19 |
# File 'lib/rafflesia/proteins/interface_burial_data.rb', line 17 def residues @residues end |
#structure_id ⇒ Object
Returns the value of attribute structure_id.
17 18 19 |
# File 'lib/rafflesia/proteins/interface_burial_data.rb', line 17 def structure_id @structure_id end |