Class: Rafflesia::StructureAlignMatrixData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::StructureAlignMatrixData
- Defined in:
- lib/rafflesia/proteins/structure_align_matrix_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ backend: :backend, executed_pair_count: :executed_pair_count, pair_count: :pair_count, pairs: :pairs, structure_ids: :structure_ids, table: :table }.freeze
Instance Attribute Summary collapse
-
#backend ⇒ Object
Returns the value of attribute backend.
-
#executed_pair_count ⇒ Object
Returns the value of attribute executed_pair_count.
-
#pair_count ⇒ Object
Returns the value of attribute pair_count.
-
#pairs ⇒ Object
Returns the value of attribute pairs.
-
#structure_ids ⇒ Object
Returns the value of attribute structure_ids.
-
#table ⇒ Object
Returns the value of attribute table.
Instance Method Summary collapse
-
#initialize(json) ⇒ StructureAlignMatrixData
constructor
A new instance of StructureAlignMatrixData.
Constructor Details
#initialize(json) ⇒ StructureAlignMatrixData
Returns a new instance of StructureAlignMatrixData.
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/rafflesia/proteins/structure_align_matrix_data.rb', line 25 def initialize(json) super() hash = self.class.normalize(json) @backend = hash[:backend] @executed_pair_count = hash[:executed_pair_count] @pair_count = hash[:pair_count] @pairs = (hash[:pairs] || []).map { |item| item ? Rafflesia::StructureAlignMatrixPair.new(item) : nil } @structure_ids = (hash[:structure_ids] || []) @table = hash[:table] ? Rafflesia::RelationArtifactData.new(hash[:table]) : nil end |
Instance Attribute Details
#backend ⇒ Object
Returns the value of attribute backend.
17 18 19 |
# File 'lib/rafflesia/proteins/structure_align_matrix_data.rb', line 17 def backend @backend end |
#executed_pair_count ⇒ Object
Returns the value of attribute executed_pair_count.
17 18 19 |
# File 'lib/rafflesia/proteins/structure_align_matrix_data.rb', line 17 def executed_pair_count @executed_pair_count end |
#pair_count ⇒ Object
Returns the value of attribute pair_count.
17 18 19 |
# File 'lib/rafflesia/proteins/structure_align_matrix_data.rb', line 17 def pair_count @pair_count end |
#pairs ⇒ Object
Returns the value of attribute pairs.
17 18 19 |
# File 'lib/rafflesia/proteins/structure_align_matrix_data.rb', line 17 def pairs @pairs end |
#structure_ids ⇒ Object
Returns the value of attribute structure_ids.
17 18 19 |
# File 'lib/rafflesia/proteins/structure_align_matrix_data.rb', line 17 def structure_ids @structure_ids end |
#table ⇒ Object
Returns the value of attribute table.
17 18 19 |
# File 'lib/rafflesia/proteins/structure_align_matrix_data.rb', line 17 def table @table end |