Class: Inscriber::ConnectionString

Inherits:
Object
  • Object
show all
Defined in:
lib/inscriber/connection_string.rb

Constant Summary collapse

ADAPTER_STRINGS =
{ 
  mysql: "%{adapter}://%{username}:%{password}@%{host}/%{database_name}",
  postgres: "%{adapter}://%{username}:%{password}@%{host}/%{database_name}",
  sqlite: "%{adapter}://%{database_name}"
}

Class Method Summary collapse

Class Method Details

.generate(options) ⇒ Object



12
13
14
# File 'lib/inscriber/connection_string.rb', line 12

def generate(options)
  ADAPTER_STRINGS[options[:adapter].to_sym] % options
end