class Backup::Compressor::Base
Public Instance Methods
compress_with() { |cmd, ext| ... }
click to toggle source
Yields to the block the compressor command and filename extension.
# File lib/backup/compressor/base.rb, line 9 def compress_with log! yield @cmd, @ext end
Private Instance Methods
compressor_name()
click to toggle source
Return the compressor name, with Backup
namespace removed
# File lib/backup/compressor/base.rb, line 18 def compressor_name self.class.to_s.sub("Backup::", "") end
log!()
click to toggle source
Logs a message to the console and log file to inform the client that Backup
is using the compressor
# File lib/backup/compressor/base.rb, line 25 def log! Logger.info "Using #{compressor_name} for compression.\n" \ " Command: '#{@cmd}'\n" \ " Ext: '#{@ext}'" end