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.



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

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

Instance Method Details

#query(hash = {}) ⇒ Object



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

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