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