Method: Bio::Fetch#initialize

Defined in:
lib/bio/io/fetch.rb

#initialize(url = nil) ⇒ Fetch

Create a new Bio::Fetch server object that can subsequently be queried using the Bio::Fetch#fetch method.

You must specify url of a server. The preset default server is deprecated.

If you want to use a server without explicitly specifying the URL, use Bio::Fetch::EBI.new that uses EBI Dbfetch server.


Arguments:

  • url: URL of dbfetch server. (no default value)

Returns

Bio::Fetch object



140
141
142
143
144
145
# File 'lib/bio/io/fetch.rb', line 140

def initialize(url = nil)
  unless url then
    raise ArgumentError, "No server URL is given in Bio::Fetch.new. The default server URL value have been deprecated. You must explicitly specify the url or use Bio::Fetch::EBI for using EBI Dbfetch."
  end
  @url = url
end