Class: BackupPants::Backup
- Inherits:
-
Object
- Object
- BackupPants::Backup
- Defined in:
- lib/backup-pants/backup.rb
Instance Method Summary collapse
-
#initialize(conf_path) ⇒ Backup
constructor
A new instance of Backup.
- #run ⇒ Object
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
#run ⇒ Object
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 |