Module: AreWeThereYet::Persistence::Connection

Defined in:
lib/are_we_there_yet/persistence/connection.rb

Defined Under Namespace

Classes: InvalidDBLocation

Class Method Summary collapse

Class Method Details

.create(uri) ⇒ Object



5
6
7
8
9
10
# File 'lib/are_we_there_yet/persistence/connection.rb', line 5

def self.create(uri)
  Sequel.connect(uri)
rescue
  raise AreWeThereYet::Persistence::Connection::InvalidDBLocation,
    "Could not connect to the database specified by the URI - please check that the location is valid"
end