Class: Backup::DatabaseModel

Inherits:
Object
  • Object
show all
Defined in:
lib/backup/database_model.rb

Constant Summary collapse

SUPPORTED_OVERRIDES =
{
  username: 'PGUSER',
  host: 'PGHOST',
  port: 'PGPORT',
  password: 'PGPASSWORD',
  # SSL
  sslmode: 'PGSSLMODE',
  sslkey: 'PGSSLKEY',
  sslcert: 'PGSSLCERT',
  sslrootcert: 'PGSSLROOTCERT',
  sslcrl: 'PGSSLCRL',
  sslcompression: 'PGSSLCOMPRESSION'
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ DatabaseModel

Returns a new instance of DatabaseModel.



21
22
23
# File 'lib/backup/database_model.rb', line 21

def initialize(name)
  configure_model(name)
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



19
20
21
# File 'lib/backup/database_model.rb', line 19

def config
  @config
end

Instance Method Details

#connectionObject



25
26
27
# File 'lib/backup/database_model.rb', line 25

def connection
  @model.connection
end