Class: Rafflesia::CationPiDetectData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::CationPiDetectData
- Defined in:
- lib/rafflesia/proteins/cation_pi_detect_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ interactions: :interactions, max_angle: :max_angle, max_distance: :max_distance, structure_id: :structure_id, summary: :summary }.freeze
Instance Attribute Summary collapse
-
#interactions ⇒ Object
Returns the value of attribute interactions.
-
#max_angle ⇒ Object
Returns the value of attribute max_angle.
-
#max_distance ⇒ Object
Returns the value of attribute max_distance.
-
#structure_id ⇒ Object
Returns the value of attribute structure_id.
-
#summary ⇒ Object
Returns the value of attribute summary.
Instance Method Summary collapse
-
#initialize(json) ⇒ CationPiDetectData
constructor
A new instance of CationPiDetectData.
Constructor Details
#initialize(json) ⇒ CationPiDetectData
Returns a new instance of CationPiDetectData.
23 24 25 26 27 28 29 30 31 |
# File 'lib/rafflesia/proteins/cation_pi_detect_data.rb', line 23 def initialize(json) super() hash = self.class.normalize(json) @interactions = (hash[:interactions] || []).map { |item| item ? Rafflesia::CationPiInteractionRecord.new(item) : nil } @max_angle = hash[:max_angle] @max_distance = hash[:max_distance] @structure_id = hash[:structure_id] @summary = hash[:summary] ? Rafflesia::CationPiSummaryData.new(hash[:summary]) : nil end |
Instance Attribute Details
#interactions ⇒ Object
Returns the value of attribute interactions.
16 17 18 |
# File 'lib/rafflesia/proteins/cation_pi_detect_data.rb', line 16 def interactions @interactions end |
#max_angle ⇒ Object
Returns the value of attribute max_angle.
16 17 18 |
# File 'lib/rafflesia/proteins/cation_pi_detect_data.rb', line 16 def max_angle @max_angle end |
#max_distance ⇒ Object
Returns the value of attribute max_distance.
16 17 18 |
# File 'lib/rafflesia/proteins/cation_pi_detect_data.rb', line 16 def max_distance @max_distance end |
#structure_id ⇒ Object
Returns the value of attribute structure_id.
16 17 18 |
# File 'lib/rafflesia/proteins/cation_pi_detect_data.rb', line 16 def structure_id @structure_id end |
#summary ⇒ Object
Returns the value of attribute summary.
16 17 18 |
# File 'lib/rafflesia/proteins/cation_pi_detect_data.rb', line 16 def summary @summary end |