Class: Rafflesia::DisulfideDetectData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::DisulfideDetectData
- Defined in:
- lib/rafflesia/proteins/disulfide_detect_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ bond_count: :bond_count, bonds: :bonds, interchain_count: :interchain_count, intrachain_count: :intrachain_count, left_handed_count: :left_handed_count, max_distance: :max_distance, right_handed_count: :right_handed_count, structure_id: :structure_id }.freeze
Instance Attribute Summary collapse
-
#bond_count ⇒ Object
Returns the value of attribute bond_count.
-
#bonds ⇒ Object
Returns the value of attribute bonds.
-
#interchain_count ⇒ Object
Returns the value of attribute interchain_count.
-
#intrachain_count ⇒ Object
Returns the value of attribute intrachain_count.
-
#left_handed_count ⇒ Object
Returns the value of attribute left_handed_count.
-
#max_distance ⇒ Object
Returns the value of attribute max_distance.
-
#right_handed_count ⇒ Object
Returns the value of attribute right_handed_count.
-
#structure_id ⇒ Object
Returns the value of attribute structure_id.
Instance Method Summary collapse
-
#initialize(json) ⇒ DisulfideDetectData
constructor
A new instance of DisulfideDetectData.
Constructor Details
#initialize(json) ⇒ DisulfideDetectData
Returns a new instance of DisulfideDetectData.
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/rafflesia/proteins/disulfide_detect_data.rb', line 29 def initialize(json) super() hash = self.class.normalize(json) @bond_count = hash[:bond_count] @bonds = (hash[:bonds] || []).map { |item| item ? Rafflesia::DisulfideBondRecord.new(item) : nil } @interchain_count = hash[:interchain_count] @intrachain_count = hash[:intrachain_count] @left_handed_count = hash[:left_handed_count] @max_distance = hash[:max_distance] @right_handed_count = hash[:right_handed_count] @structure_id = hash[:structure_id] end |
Instance Attribute Details
#bond_count ⇒ Object
Returns the value of attribute bond_count.
19 20 21 |
# File 'lib/rafflesia/proteins/disulfide_detect_data.rb', line 19 def bond_count @bond_count end |
#bonds ⇒ Object
Returns the value of attribute bonds.
19 20 21 |
# File 'lib/rafflesia/proteins/disulfide_detect_data.rb', line 19 def bonds @bonds end |
#interchain_count ⇒ Object
Returns the value of attribute interchain_count.
19 20 21 |
# File 'lib/rafflesia/proteins/disulfide_detect_data.rb', line 19 def interchain_count @interchain_count end |
#intrachain_count ⇒ Object
Returns the value of attribute intrachain_count.
19 20 21 |
# File 'lib/rafflesia/proteins/disulfide_detect_data.rb', line 19 def intrachain_count @intrachain_count end |
#left_handed_count ⇒ Object
Returns the value of attribute left_handed_count.
19 20 21 |
# File 'lib/rafflesia/proteins/disulfide_detect_data.rb', line 19 def left_handed_count @left_handed_count end |
#max_distance ⇒ Object
Returns the value of attribute max_distance.
19 20 21 |
# File 'lib/rafflesia/proteins/disulfide_detect_data.rb', line 19 def max_distance @max_distance end |
#right_handed_count ⇒ Object
Returns the value of attribute right_handed_count.
19 20 21 |
# File 'lib/rafflesia/proteins/disulfide_detect_data.rb', line 19 def right_handed_count @right_handed_count end |
#structure_id ⇒ Object
Returns the value of attribute structure_id.
19 20 21 |
# File 'lib/rafflesia/proteins/disulfide_detect_data.rb', line 19 def structure_id @structure_id end |