Class: Bio::Hinv::IdSearch

Inherits:
KeywordSearch show all
Defined in:
lib/bio/io/hinv.rb

Overview

serv = Bio::Hinv::IdSearch.new serv.query(“query” => “HIT00002218*”, “id_type” => “H-INVITATIONAL-ID”, “start” => 1, “end” => 100) puts serv.result puts serv.size puts serv.start puts serv.end

Instance Method Summary collapse

Methods inherited from KeywordSearch

#end, #result, #size, #start

Constructor Details

#initializeIdSearch

Returns a new instance of IdSearch.



425
426
427
# File 'lib/bio/io/hinv.rb', line 425

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

Instance Method Details

#query(hash = {}) ⇒ Object



429
430
431
432
433
434
435
436
437
# File 'lib/bio/io/hinv.rb', line 429

def query(hash = {})
  default = {
    "id_type" => "H-INVITATIONAL-ID",
    "start" => 1,
    "end" => 100
  }
  options = default.update(hash)
  super(options)
end