Method: Bio::Registry#initialize

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

#initialize(file = nil) ⇒ Registry

Returns a new instance of Registry.



99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# File 'lib/bio/io/registry.rb', line 99

def initialize(file = nil)
  @spec_version = nil
  @databases = Array.new
  read_local(file) if file
  env_path = ENV['OBDA_SEARCH_PATH']
  if env_path and env_path.size > 0
    read_env(env_path)
  else
    read_local("#{ENV['HOME']}/.bioinformatics/seqdatabase.ini")
    read_local("/etc/bioinformatics/seqdatabase.ini")
    if @databases.empty?
      read_remote("http://www.open-bio.org/registry/seqdatabase.ini")
    end
  end
end