Sha256: dd260101941b1e30c3c0d59d5ab9ea2877741ee61428552cb3a6a2236a17c3f9
Contents?: true
Size: 713 Bytes
Versions: 8
Compression:
Stored size: 713 Bytes
Contents
require "monetdb/connection" require "monetdb/error" require "monetdb/version" module MonetDB def self.logger=(logger) @logger = logger end def self.logger @logger end def self.configurations=(configurations) @configurations = configurations.inject({}){|h, (k, v)| h[k.to_s] = v; h} end def self.configurations @configurations end def self.establish_connection(arg) config = arg.is_a?(Hash) ? arg : (configurations || {})[arg.to_s] if config @connection = Connection.new(config) @connection.connect else raise ConnectionError, "Unable to establish connection for #{arg.inspect}" end end def self.connection @connection end end
Version data entries
8 entries across 8 versions & 1 rubygems