class Pupa::Processor::Connection
A database system connection factory.
Public Class Methods
new(database_url)
click to toggle source
Returns a configured connection to a database system.
See each connection adapter for more information.
@param [String] database_url the database URL @return a configured connection to a database system
# File lib/pupa/processor/connection.rb, line 14 def self.new(database_url) case URI.parse(database_url).scheme when 'postgres', 'sqlite' PostgreSQLAdapter.new(database_url) when 'mongodb' MongoDBAdapter.new(database_url) else raise NotImplementedError end end