# File lib/dbi/utils.rb, line 25
25:         def self.parse_params(str)
26:             # improved by John Gorman <jgorman@webbysoft.com>
27:             params = str.split(";")
28:             hash = {}
29:             params.each do |param| 
30:                 key, val = param.split("=") 
31:                 hash[key] = val if key and val
32:             end 
33:             if hash.empty?
34:                 database, host = str.split(":")
35:                 hash['database'] = database if database
36:                 hash['host']     = host if host   
37:             end
38:             hash 
39:         end