Class: LogBackupDriver
- Inherits:
-
CloudBackup::Driver
- Object
- CloudBackup::Driver
- LogBackupDriver
- Defined in:
- lib/drivers/log_backup_driver.rb
Instance Method Summary collapse
-
#initialize(stream) ⇒ LogBackupDriver
constructor
A new instance of LogBackupDriver.
- #initiate ⇒ Object
- #list_by_date ⇒ Object
- #remove(name) ⇒ Object
- #terminate ⇒ Object
- #upload ⇒ Object
Methods inherited from CloudBackup::Driver
Constructor Details
#initialize(stream) ⇒ LogBackupDriver
Returns a new instance of LogBackupDriver.
3 4 5 |
# File 'lib/drivers/log_backup_driver.rb', line 3 def initialize stream @stream = stream end |
Instance Method Details
#initiate ⇒ Object
7 8 9 |
# File 'lib/drivers/log_backup_driver.rb', line 7 def initiate output 'Initiating execution' end |
#list_by_date ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/drivers/log_backup_driver.rb', line 11 def list_by_date output 'Listing driver items by date' list.each do |file| output "Listing.. file: #{file}" end @list ||= list end |
#remove(name) ⇒ Object
19 20 21 22 |
# File 'lib/drivers/log_backup_driver.rb', line 19 def remove name @list = @list - [name] output "Removing item: #{name}" end |
#terminate ⇒ Object
30 31 32 |
# File 'lib/drivers/log_backup_driver.rb', line 30 def terminate output 'Terminating execution' end |
#upload ⇒ Object
24 25 26 27 28 |
# File 'lib/drivers/log_backup_driver.rb', line 24 def upload list.each do |file| output "Uploading.. file: #{file}" end end |