Class: BackupPants::Backup

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

Instance Method Summary collapse

Constructor Details

#initialize(conf_path) ⇒ Backup

Returns a new instance of Backup.



3
4
5
# File 'lib/backup-pants/backup.rb', line 3

def initialize(conf_path)
  @conf_path = conf_path ? conf_path : 'pants.conf'
end

Instance Method Details

#runObject



7
8
9
10
# File 'lib/backup-pants/backup.rb', line 7

def run
  self.dirs.each {|dir| backup_dir(dir)}
  self.dbs.each {|db| backup_db(db)}
end