Class: Rafflesia::TargetCandidate

Inherits:
Rafflesia::Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/refs/target_candidate.rb

Constant Summary collapse

HASH_ATTRS =
{
  accession: :accession,
  ambiguous: :ambiguous,
  annotations: :annotations,
  exact: :exact,
  label: :label,
  namespace: :namespace,
  organism: :organism,
  reviewed: :reviewed,
  sequence_id: :sequence_id,
  source: :source,
  target_id: :target_id,
  taxon_id: :taxon_id
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ TargetCandidate

Returns a new instance of TargetCandidate.



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/rafflesia/refs/target_candidate.rb', line 37

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @accession = hash[:accession]
  @ambiguous = hash[:ambiguous]
  @annotations = hash[:annotations] || {}
  @exact = hash[:exact]
  @label = hash[:label]
  @namespace = hash[:namespace]
  @organism = hash[:organism]
  @reviewed = hash[:reviewed]
  @sequence_id = hash[:sequence_id]
  @source = hash[:source]
  @target_id = hash[:target_id]
  @taxon_id = hash[:taxon_id]
end

Instance Attribute Details

#accessionObject

Returns the value of attribute accession.



23
24
25
# File 'lib/rafflesia/refs/target_candidate.rb', line 23

def accession
  @accession
end

#ambiguousObject

Returns the value of attribute ambiguous.



23
24
25
# File 'lib/rafflesia/refs/target_candidate.rb', line 23

def ambiguous
  @ambiguous
end

#annotationsObject

Returns the value of attribute annotations.



23
24
25
# File 'lib/rafflesia/refs/target_candidate.rb', line 23

def annotations
  @annotations
end

#exactObject

Returns the value of attribute exact.



23
24
25
# File 'lib/rafflesia/refs/target_candidate.rb', line 23

def exact
  @exact
end

#labelObject

Returns the value of attribute label.



23
24
25
# File 'lib/rafflesia/refs/target_candidate.rb', line 23

def label
  @label
end

#namespaceObject

Returns the value of attribute namespace.



23
24
25
# File 'lib/rafflesia/refs/target_candidate.rb', line 23

def namespace
  @namespace
end

#organismObject

Returns the value of attribute organism.



23
24
25
# File 'lib/rafflesia/refs/target_candidate.rb', line 23

def organism
  @organism
end

#reviewedObject

Returns the value of attribute reviewed.



23
24
25
# File 'lib/rafflesia/refs/target_candidate.rb', line 23

def reviewed
  @reviewed
end

#sequence_idObject

Returns the value of attribute sequence_id.



23
24
25
# File 'lib/rafflesia/refs/target_candidate.rb', line 23

def sequence_id
  @sequence_id
end

#sourceObject

Returns the value of attribute source.



23
24
25
# File 'lib/rafflesia/refs/target_candidate.rb', line 23

def source
  @source
end

#target_idObject

Returns the value of attribute target_id.



23
24
25
# File 'lib/rafflesia/refs/target_candidate.rb', line 23

def target_id
  @target_id
end

#taxon_idObject

Returns the value of attribute taxon_id.



23
24
25
# File 'lib/rafflesia/refs/target_candidate.rb', line 23

def taxon_id
  @taxon_id
end