Class: Rafflesia::StructureAlignMatrixPair

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/proteins/structure_align_matrix_pair.rb

Constant Summary collapse

HASH_ATTRS =
{
  alignment: :alignment,
  executed: :executed,
  query_id: :query_id,
  target_id: :target_id
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ StructureAlignMatrixPair

Returns a new instance of StructureAlignMatrixPair.



21
22
23
24
25
26
27
28
# File 'lib/rafflesia/proteins/structure_align_matrix_pair.rb', line 21

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @alignment = hash[:alignment] ? Rafflesia::StructureAlignment.new(hash[:alignment]) : nil
  @executed = hash[:executed]
  @query_id = hash[:query_id]
  @target_id = hash[:target_id]
end

Instance Attribute Details

#alignmentObject

Returns the value of attribute alignment.



15
16
17
# File 'lib/rafflesia/proteins/structure_align_matrix_pair.rb', line 15

def alignment
  @alignment
end

#executedObject

Returns the value of attribute executed.



15
16
17
# File 'lib/rafflesia/proteins/structure_align_matrix_pair.rb', line 15

def executed
  @executed
end

#query_idObject

Returns the value of attribute query_id.



15
16
17
# File 'lib/rafflesia/proteins/structure_align_matrix_pair.rb', line 15

def query_id
  @query_id
end

#target_idObject

Returns the value of attribute target_id.



15
16
17
# File 'lib/rafflesia/proteins/structure_align_matrix_pair.rb', line 15

def target_id
  @target_id
end