Class: Rafflesia::MetalLigandRecord
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::MetalLigandRecord
- Defined in:
- lib/rafflesia/proteins/metal_ligand_record.rb
Constant Summary collapse
- HASH_ATTRS =
{ atom_name: :atom_name, distance_angstrom: :distance_angstrom, donor_element: :donor_element, residue: :residue }.freeze
Instance Attribute Summary collapse
-
#atom_name ⇒ Object
Returns the value of attribute atom_name.
-
#distance_angstrom ⇒ Object
Returns the value of attribute distance_angstrom.
-
#donor_element ⇒ Object
Returns the value of attribute donor_element.
-
#residue ⇒ Object
Returns the value of attribute residue.
Instance Method Summary collapse
-
#initialize(json) ⇒ MetalLigandRecord
constructor
A new instance of MetalLigandRecord.
Constructor Details
#initialize(json) ⇒ MetalLigandRecord
Returns a new instance of MetalLigandRecord.
21 22 23 24 25 26 27 28 |
# File 'lib/rafflesia/proteins/metal_ligand_record.rb', line 21 def initialize(json) super() hash = self.class.normalize(json) @atom_name = hash[:atom_name] @distance_angstrom = hash[:distance_angstrom] @donor_element = hash[:donor_element] @residue = hash[:residue] ? Rafflesia::ResiduePointer.new(hash[:residue]) : nil end |
Instance Attribute Details
#atom_name ⇒ Object
Returns the value of attribute atom_name.
15 16 17 |
# File 'lib/rafflesia/proteins/metal_ligand_record.rb', line 15 def atom_name @atom_name end |
#distance_angstrom ⇒ Object
Returns the value of attribute distance_angstrom.
15 16 17 |
# File 'lib/rafflesia/proteins/metal_ligand_record.rb', line 15 def distance_angstrom @distance_angstrom end |
#donor_element ⇒ Object
Returns the value of attribute donor_element.
15 16 17 |
# File 'lib/rafflesia/proteins/metal_ligand_record.rb', line 15 def donor_element @donor_element end |
#residue ⇒ Object
Returns the value of attribute residue.
15 16 17 |
# File 'lib/rafflesia/proteins/metal_ligand_record.rb', line 15 def residue @residue end |