Class: Chem::PubChem::PubChemEntry
- Inherits:
-
Object
- Object
- Chem::PubChem::PubChemEntry
- Defined in:
- lib/chem/db/pubchem.rb
Instance Method Summary collapse
- #get_sdf ⇒ Object
- #get_xml ⇒ Object
-
#initialize(cid) ⇒ PubChemEntry
constructor
A new instance of PubChemEntry.
Constructor Details
#initialize(cid) ⇒ PubChemEntry
Returns a new instance of PubChemEntry.
83 84 85 |
# File 'lib/chem/db/pubchem.rb', line 83 def initialize cid @cid = cid end |
Instance Method Details
#get_sdf ⇒ Object
92 93 94 95 |
# File 'lib/chem/db/pubchem.rb', line 92 def get_sdf Net::HTTP.version_1_2 Net::HTTP.get(Host, Summary + "\?disopt=DisplaySDF&cid=%d" % @cid) end |
#get_xml ⇒ Object
87 88 89 90 |
# File 'lib/chem/db/pubchem.rb', line 87 def get_xml Net::HTTP.version_1_2 Net::HTTP.get(Host, Summary + "\?disopt=DisplayXML&cid=%dd" % @cid) end |