Class: Rafflesia::TargetCandidate
- Inherits:
-
Rafflesia::Types::BaseModel
- Object
- Rafflesia::Types::BaseModel
- Rafflesia::TargetCandidate
- 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
-
#accession ⇒ Object
Returns the value of attribute accession.
-
#ambiguous ⇒ Object
Returns the value of attribute ambiguous.
-
#annotations ⇒ Object
Returns the value of attribute annotations.
-
#exact ⇒ Object
Returns the value of attribute exact.
-
#label ⇒ Object
Returns the value of attribute label.
-
#namespace ⇒ Object
Returns the value of attribute namespace.
-
#organism ⇒ Object
Returns the value of attribute organism.
-
#reviewed ⇒ Object
Returns the value of attribute reviewed.
-
#sequence_id ⇒ Object
Returns the value of attribute sequence_id.
-
#source ⇒ Object
Returns the value of attribute source.
-
#target_id ⇒ Object
Returns the value of attribute target_id.
-
#taxon_id ⇒ Object
Returns the value of attribute taxon_id.
Instance Method Summary collapse
-
#initialize(json) ⇒ TargetCandidate
constructor
A new instance of TargetCandidate.
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
#accession ⇒ Object
Returns the value of attribute accession.
23 24 25 |
# File 'lib/rafflesia/refs/target_candidate.rb', line 23 def accession @accession end |
#ambiguous ⇒ Object
Returns the value of attribute ambiguous.
23 24 25 |
# File 'lib/rafflesia/refs/target_candidate.rb', line 23 def ambiguous @ambiguous end |
#annotations ⇒ Object
Returns the value of attribute annotations.
23 24 25 |
# File 'lib/rafflesia/refs/target_candidate.rb', line 23 def annotations @annotations end |
#exact ⇒ Object
Returns the value of attribute exact.
23 24 25 |
# File 'lib/rafflesia/refs/target_candidate.rb', line 23 def exact @exact end |
#label ⇒ Object
Returns the value of attribute label.
23 24 25 |
# File 'lib/rafflesia/refs/target_candidate.rb', line 23 def label @label end |
#namespace ⇒ Object
Returns the value of attribute namespace.
23 24 25 |
# File 'lib/rafflesia/refs/target_candidate.rb', line 23 def namespace @namespace end |
#organism ⇒ Object
Returns the value of attribute organism.
23 24 25 |
# File 'lib/rafflesia/refs/target_candidate.rb', line 23 def organism @organism end |
#reviewed ⇒ Object
Returns the value of attribute reviewed.
23 24 25 |
# File 'lib/rafflesia/refs/target_candidate.rb', line 23 def reviewed @reviewed end |
#sequence_id ⇒ Object
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 |
#source ⇒ Object
Returns the value of attribute source.
23 24 25 |
# File 'lib/rafflesia/refs/target_candidate.rb', line 23 def source @source end |
#target_id ⇒ Object
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_id ⇒ Object
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 |