Class: Bio::Hinv::Hit2acc

Inherits:
Object show all
Includes:
Common
Defined in:
lib/bio/io/hinv.rb

Overview

serv = Bio::Hinv::Hit2acc.new serv.query(“hit” => “HIT000022181”) puts serv.result

Instance Method Summary (collapse)

Methods included from Common

#query

Constructor Details

- (Hit2acc) initialize

Returns a new instance of Hit2acc



138
139
140
# File 'lib/bio/io/hinv.rb', line 138

def initialize
  @url = BASE_URI + "hit2acc.php"
end

Instance Method Details

- (Object) result

<?xml version='1.0' encoding='UTF-8'?> <H-Inv>

<ACCESSION-NO>AK097327</ACCESSION-NO>

</H-Inv>



146
147
148
# File 'lib/bio/io/hinv.rb', line 146

def result
  @xml.elements['//ACCESSION-NO'].text
end