Class: PubChemAPI::GeneSummary
- Inherits:
-
APIResponse
- Object
- APIResponse
- PubChemAPI::GeneSummary
- Defined in:
- lib/pubchem_api.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#gene_id ⇒ Object
readonly
Returns the value of attribute gene_id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#symbol ⇒ Object
readonly
Returns the value of attribute symbol.
-
#taxonomy_id ⇒ Object
readonly
Returns the value of attribute taxonomy_id.
Instance Method Summary collapse
-
#initialize(data) ⇒ GeneSummary
constructor
A new instance of GeneSummary.
Constructor Details
#initialize(data) ⇒ GeneSummary
Returns a new instance of GeneSummary.
77 78 79 80 81 82 83 84 85 |
# File 'lib/pubchem_api.rb', line 77 def initialize(data) super(data) gene = data['InformationList']['Information'].first @gene_id = gene['GeneID'] @symbol = gene['Symbol'] @name = gene['Name'] @taxonomy_id = gene['TaxID'] @description = gene['Description'] end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
75 76 77 |
# File 'lib/pubchem_api.rb', line 75 def description @description end |
#gene_id ⇒ Object (readonly)
Returns the value of attribute gene_id.
75 76 77 |
# File 'lib/pubchem_api.rb', line 75 def gene_id @gene_id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
75 76 77 |
# File 'lib/pubchem_api.rb', line 75 def name @name end |
#symbol ⇒ Object (readonly)
Returns the value of attribute symbol.
75 76 77 |
# File 'lib/pubchem_api.rb', line 75 def symbol @symbol end |
#taxonomy_id ⇒ Object (readonly)
Returns the value of attribute taxonomy_id.
75 76 77 |
# File 'lib/pubchem_api.rb', line 75 def taxonomy_id @taxonomy_id end |