Class: Rafflesia::StructureAlignMatrixData

Inherits:
Types::BaseModel
  • Object
show all
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

Instance Method Summary collapse

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

#backendObject

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_countObject

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_countObject

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

#pairsObject

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_idsObject

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

#tableObject

Returns the value of attribute table.



17
18
19
# File 'lib/rafflesia/proteins/structure_align_matrix_data.rb', line 17

def table
  @table
end