Class: PubChemAPI::ProteinSummary
- Inherits:
-
APIResponse
- Object
- APIResponse
- PubChemAPI::ProteinSummary
- Defined in:
- lib/pubchem_api.rb
Instance Attribute Summary collapse
-
#accession ⇒ Object
readonly
Returns the value of attribute accession.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#synonyms ⇒ Object
readonly
Returns the value of attribute synonyms.
-
#taxonomy_id ⇒ Object
readonly
Returns the value of attribute taxonomy_id.
Instance Method Summary collapse
-
#initialize(data) ⇒ ProteinSummary
constructor
A new instance of ProteinSummary.
Constructor Details
#initialize(data) ⇒ ProteinSummary
Returns a new instance of ProteinSummary.
120 121 122 123 124 125 126 127 |
# File 'lib/pubchem_api.rb', line 120 def initialize(data) super(data) protein = data['InformationList']['Information'].first @accession = protein['Accession'] @name = protein['Title'] @taxonomy_id = protein['TaxId'] @synonyms = protein['Synonym'] end |
Instance Attribute Details
#accession ⇒ Object (readonly)
Returns the value of attribute accession.
118 119 120 |
# File 'lib/pubchem_api.rb', line 118 def accession @accession end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
118 119 120 |
# File 'lib/pubchem_api.rb', line 118 def name @name end |
#synonyms ⇒ Object (readonly)
Returns the value of attribute synonyms.
118 119 120 |
# File 'lib/pubchem_api.rb', line 118 def synonyms @synonyms end |
#taxonomy_id ⇒ Object (readonly)
Returns the value of attribute taxonomy_id.
118 119 120 |
# File 'lib/pubchem_api.rb', line 118 def taxonomy_id @taxonomy_id end |