Class: Ariranha::Drivers::BaseDriver

Inherits:
Object
  • Object
show all
Defined in:
lib/ariranha/drivers/base_driver.rb

Direct Known Subclasses

Mysql, Postgresql

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ BaseDriver

Returns a new instance of BaseDriver.



6
7
8
9
10
# File 'lib/ariranha/drivers/base_driver.rb', line 6

def initialize(config)
  @config = config
  config_driver
  @timestamp = Time.now.getutc.strftime('%Y%m%d%H%M%S')
end

Instance Attribute Details

#databaseObject (readonly)

Returns the value of attribute database.



12
13
14
# File 'lib/ariranha/drivers/base_driver.rb', line 12

def database
  @database
end

Instance Method Details

#backupObject



14
15
16
17
18
# File 'lib/ariranha/drivers/base_driver.rb', line 14

def backup
  puts "running #{backup_cmd}..."
  _out, _err, _status = Open3.capture3(*backup_cmd)
  filename
end