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