Sha256: de23bec427fa77c50f4dcd158506cb1186d3eea060a1d42b84d2c79315627e46
Contents?: true
Size: 494 Bytes
Versions: 3
Compression:
Stored size: 494 Bytes
Contents
module Oculus module Connection class Error < StandardError; end class AdapterNotFound < Error; end def self.connect(options) case options[:adapter] when 'mysql' require 'oculus/connection/mysql2' Mysql2 when 'postgres', 'pg' require 'oculus/connection/postgres' Postgres else raise AdapterNotFound, "#{options[:adapter]} is not currently implemented. You should write it!" end.new(options) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
oculus-0.9.3 | lib/oculus/connection.rb |
oculus-0.9.2 | lib/oculus/connection.rb |
oculus-0.9.1 | lib/oculus/connection.rb |