Method: Sequel::DataObjects::Database#initialize
- Defined in:
- lib/sequel/adapters/do.rb
#initialize(opts) ⇒ Database
Call the DATABASE_SETUP proc directly after initialization, so the object always uses sub adapter specific code. Also, raise an error immediately if the connection doesn’t have a uri, since DataObjects requires one.
51 52 53 54 55 56 57 |
# File 'lib/sequel/adapters/do.rb', line 51 def initialize(opts) super raise(Error, "No connection string specified") unless uri if prok = DATABASE_SETUP[subadapter.to_sym] prok.call(self) end end |