Class: Bio::Hinv::HitPubmedId
- Includes:
- Common
- Defined in:
- lib/bio/io/hinv.rb
Overview
serv = Bio::Hinv::HitPubmedId.new serv.query(“hit” => “HIT000053961”) puts serv.result
Instance Method Summary collapse
-
#initialize ⇒ HitPubmedId
constructor
A new instance of HitPubmedId.
-
#result ⇒ Object
<?xml version=‘1.0’ encoding=‘UTF-8’?> <H-Inv> <CDNA_DB-REFERENCE_PUBMED>7624364</CDNA_DB-REFERENCE_PUBMED> <CDNA_DB-REFERENCE_PUBMED>11279095</CDNA_DB-REFERENCE_PUBMED> <CDNA_DB-REFERENCE_PUBMED>15489334</CDNA_DB-REFERENCE_PUBMED> </H-Inv>.
Methods included from Common
Constructor Details
#initialize ⇒ HitPubmedId
Returns a new instance of HitPubmedId.
236 237 238 |
# File 'lib/bio/io/hinv.rb', line 236 def initialize @url = BASE_URI + "hit_pubmedid.php" end |
Instance Method Details
#result ⇒ Object
<?xml version=‘1.0’ encoding=‘UTF-8’?> <H-Inv>
<CDNA_DB-REFERENCE_PUBMED>7624364</CDNA_DB-REFERENCE_PUBMED>
<CDNA_DB-REFERENCE_PUBMED>11279095</CDNA_DB-REFERENCE_PUBMED>
<CDNA_DB-REFERENCE_PUBMED>15489334</CDNA_DB-REFERENCE_PUBMED>
</H-Inv>
246 247 248 249 250 251 252 |
# File 'lib/bio/io/hinv.rb', line 246 def result list = [] @xml.elements.each('//CDNA_DB-REFERENCE_PUBMED') do |e| list << e.text.to_i end return list end |