class Bio::Hinv::HitPubmedId

serv = ::new serv.query(“hit” => “HIT000053961”) puts serv.result

Public Class Methods

new() click to toggle source
# File lib/bio/io/hinv.rb, line 235
def initialize
  @url = BASE_URI + "hit_pubmedid.php"
end

Public Instance Methods

result() click to toggle source

<?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>

# File lib/bio/io/hinv.rb, line 245
def result
  list = []
  @xml.elements.each('//CDNA_DB-REFERENCE_PUBMED') do |e|
    list << e.text.to_i
  end
  return list
end