module PgConn

def self.ensure(*args)

PgConn::Connection object
PgConn::Connection#initialize arguments that will be used to create a new
can be an existing connection that will just be returned or a set of
Returns a PgConn::Connection object (aka. a PgConn object). It's arguments
def self.ensure(*args)
  if args.size == 1 && args.first.is_a?(PgConn::Connection)
    args.first
  else
    PgConn::Connection.new(*args)
  end
end