Method: DataMapper::Database#initialize
- Defined in:
- lib/data_mapper/database.rb
#initialize(name) ⇒ Database
Creates a new database object with the name you specify, and a default set of options.
The default options are as follows:
{ :host => 'localhost', :database => nil, :port => nil, :username => 'root', :password => '', :adapter = nil }
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 |
# File 'lib/data_mapper/database.rb', line 162 def initialize(name) @name = name @adapter = nil @host = 'localhost' @database = nil @port = nil @schema_search_path = nil @username = 'root' @password = '' @socket = nil @log_level = Logger::WARN @log_stream = nil end |