Class: Outback::Target

Inherits:
Object show all
Includes:
Configurable, Logging
Defined in:
lib/outback/target.rb

Direct Known Subclasses

DirectoryTarget, S3Target, SftpTarget

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Logging

#logger

Methods included from Configurable

#attr_setter, included

Constructor Details

#initialize(backup_name) ⇒ Target



8
9
10
# File 'lib/outback/target.rb', line 8

def initialize(backup_name)
  @backup_name = backup_name
end

Instance Attribute Details

#backup_nameObject (readonly)

Returns the value of attribute backup_name.



6
7
8
# File 'lib/outback/target.rb', line 6

def backup_name
  @backup_name
end

Instance Method Details

#purge!Object



12
13
14
15
16
# File 'lib/outback/target.rb', line 12

def purge!
  if purged_archives = connect { purge_archives }
    logger.info "Purged #{purged_archives.size} archives (#{purged_archives.sum(&:size)} bytes) from #{self}"
  end
end