Sha256: e0ef006fa1009c3a8e4ee471ae98f6a29f5f30cf1b304e94d80aa87ba8db8b88

Contents?: true

Size: 717 Bytes

Versions: 1

Compression:

Stored size: 717 Bytes

Contents

class LogBackupDriver < CloudBackup::Driver

  def initialize stream
    @stream = stream
  end

  def initiate
    output 'Initiating execution'
  end

  def identificator
    @identificator
  end

  def identificator= name
    @identificator = name
  end

  def list_by_date
    output 'Listing driver items by date'
    list.each do |file|
      output "Listing.. file: #{file}"
    end
    @list ||= list
  end

  def remove name
    @list = @list - [name]
    output "Removing item: #{name}"
  end

  def upload
    list.each do |file|
      output "Uploading.. file: #{file}"
    end
  end

  def terminate
    output 'Terminating execution'
  end

  private

  def output data
    @stream.puts data
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cloud-backup-0.0.1 lib/drivers/log_backup_driver.rb