Class: Bio::BaseSpace::GenomeV1
- Defined in:
- lib/basespace/model/genome_v1.rb
Overview
Genome model.
Instance Attribute Summary
Attributes inherited from Model
Instance Method Summary collapse
-
#initialize ⇒ GenomeV1
constructor
Create a new GenomeV1 instance.
-
#to_s ⇒ Object
Return species name, or if absent, return display name, or if absent too, return the Href.
Methods inherited from Model
#get_attr, #method_missing, #set_attr, #to_str
Constructor Details
#initialize ⇒ GenomeV1
Create a new GenomeV1 instance.
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/basespace/model/genome_v1.rb', line 23 def initialize @swagger_types = { 'Source' => 'str', 'SpeciesName' => 'str', 'Build' => 'str', 'Id' => 'str', 'Href' => 'str', 'DisplayName' => 'str', } @attributes = { 'Source' => nil, # str 'SpeciesName' => nil, # str 'Build' => nil, # str 'Id' => nil, # str 'Href' => nil, # str 'DisplayName' => nil, # str } end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Bio::BaseSpace::Model
Instance Method Details
#to_s ⇒ Object
Return species name, or if absent, return display name, or if absent too, return the Href.
43 44 45 46 47 48 49 50 51 |
# File 'lib/basespace/model/genome_v1.rb', line 43 def to_s if get_attr('SpeciesName') return get_attr('SpeciesName') elsif get_attr('DisplayName') return get_attr('DisplayName') else return "Genome @ #{get_attr('Href')}" end end |