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