Module: PgBackup::Helpers::Database
- Defined in:
- lib/pg_backup/helpers/database.rb
Instance Method Summary collapse
- #connection_config ⇒ Object
- #with_database_config {|connection_config.fetch(:host, 'localhost'), connection_config.fetch(:database), connection_config.fetch(:username), connection_config.fetch(:password)| ... } ⇒ Object
Instance Method Details
#connection_config ⇒ Object
13 14 15 |
# File 'lib/pg_backup/helpers/database.rb', line 13 def connection_config ActiveRecord::Base.connection_config end |
#with_database_config {|connection_config.fetch(:host, 'localhost'), connection_config.fetch(:database), connection_config.fetch(:username), connection_config.fetch(:password)| ... } ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/pg_backup/helpers/database.rb', line 4 def with_database_config yield( connection_config.fetch(:host, 'localhost'), connection_config.fetch(:database), connection_config.fetch(:username), connection_config.fetch(:password) ) end |