Class: PubChemAPI::AssayRecord
- Inherits:
-
APIResponse
- Object
- APIResponse
- PubChemAPI::AssayRecord
- Defined in:
- lib/pubchem_api.rb
Instance Attribute Summary collapse
-
#aid ⇒ Object
readonly
Returns the value of attribute aid.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(data) ⇒ AssayRecord
constructor
A new instance of AssayRecord.
Constructor Details
#initialize(data) ⇒ AssayRecord
Returns a new instance of AssayRecord.
63 64 65 66 67 68 69 70 71 |
# File 'lib/pubchem_api.rb', line 63 def initialize(data) super(data) assay_container = data['PC_AssayContainer'].first assay = assay_container['assay'] descr = assay['descr'] @aid = descr['aid']['id'] @name = descr['name'] @description = descr['description'] end |
Instance Attribute Details
#aid ⇒ Object (readonly)
Returns the value of attribute aid.
61 62 63 |
# File 'lib/pubchem_api.rb', line 61 def aid @aid end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
61 62 63 |
# File 'lib/pubchem_api.rb', line 61 def description @description end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
61 62 63 |
# File 'lib/pubchem_api.rb', line 61 def name @name end |