class Bio::Hinv::KeywordSearch

serv = Bio::Hinv::KeywordSearch.new serv.query(“query” => “HIT00002218*”, “start” => 1, “end” => 100) puts serv.result puts serv.size puts serv.start puts serv.end

Public Class Methods

new() click to toggle source
    # File lib/bio/io/hinv.rb
370 def initialize
371   @url = BASE_URI + "keyword_search.php"
372 end

Public Instance Methods

end() click to toggle source
    # File lib/bio/io/hinv.rb
412 def end
413   @xml.elements['//END'].text.to_i
414 end
query(hash = {}) click to toggle source
Calls superclass method Bio::Hinv::Common#query
    # File lib/bio/io/hinv.rb
374 def query(hash = {})
375   default = {
376     "start" => 1,
377     "end" => 100
378   }
379   options = default.update(hash)
380   super(options)
381 end
result() click to toggle source

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

<QUERY>HIT00002218*</QUERY>
<SIZE>8</SIZE>
<START>1</START>
<END>8</END>
<H-INVITATIONAL-ID>HIT000022180</H-INVITATIONAL-ID>
<H-INVITATIONAL-ID>HIT000022181</H-INVITATIONAL-ID>
<H-INVITATIONAL-ID>HIT000022183</H-INVITATIONAL-ID>
<H-INVITATIONAL-ID>HIT000022184</H-INVITATIONAL-ID>
<H-INVITATIONAL-ID>HIT000022185</H-INVITATIONAL-ID>
<H-INVITATIONAL-ID>HIT000022186</H-INVITATIONAL-ID>
<H-INVITATIONAL-ID>HIT000022188</H-INVITATIONAL-ID>
<H-INVITATIONAL-ID>HIT000022189</H-INVITATIONAL-ID>

</HINVDB_SEARCH>

    # File lib/bio/io/hinv.rb
398 def result
399   list = []
400   @xml.elements.each('//H-INVITATIONAL-ID') do |e|
401     list << e.text
402   end
403   return list
404 end
size() click to toggle source
    # File lib/bio/io/hinv.rb
406 def size
407   @xml.elements['//SIZE'].text.to_i
408 end
start() click to toggle source
    # File lib/bio/io/hinv.rb
409 def start
410   @xml.elements['//START'].text.to_i
411 end