Class: Rafflesia::ProteinFoldCandidateHit

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

Constant Summary collapse

HASH_ATTRS =
{
  exact_score: :exact_score,
  shared_tokens: :shared_tokens,
  struct_id: :struct_id,
  structure_id: :structure_id
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ ProteinFoldCandidateHit

Returns a new instance of ProteinFoldCandidateHit.



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

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @exact_score = hash[:exact_score]
  @shared_tokens = hash[:shared_tokens]
  @struct_id = hash[:struct_id]
  @structure_id = hash[:structure_id]
end

Instance Attribute Details

#exact_scoreObject

Returns the value of attribute exact_score.



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

def exact_score
  @exact_score
end

#shared_tokensObject

Returns the value of attribute shared_tokens.



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

def shared_tokens
  @shared_tokens
end

#struct_idObject

Returns the value of attribute struct_id.



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

def struct_id
  @struct_id
end

#structure_idObject

Returns the value of attribute structure_id.



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

def structure_id
  @structure_id
end