Sha256: 4306e7297518fa2d6f267c74290f6dcd0047f1182b347a668e2d49897a09c440
Contents?: true
Size: 1.02 KB
Versions: 34
Compression:
Stored size: 1.02 KB
Contents
# encoding: utf-8 module Backup class Package ## # The time when the backup initiated (in format: 2011.02.20.03.29.59) attr_accessor :time ## # The trigger which initiated the backup process attr_reader :trigger ## # Extension for the final archive file(s) attr_accessor :extension ## # Set by the Splitter if the final archive was "chunked" attr_accessor :chunk_suffixes ## # If true, the Cycler will not attempt to remove the package when Cycling. attr_accessor :no_cycle ## # The version of Backup used to create the package attr_reader :version def initialize(model) @trigger = model.trigger @extension = 'tar' @chunk_suffixes = Array.new @no_cycle = false @version = VERSION end def filenames if chunk_suffixes.empty? [basename] else chunk_suffixes.map {|suffix| "#{ basename }-#{ suffix }" } end end def basename "#{ trigger }.#{ extension }" end end end
Version data entries
34 entries across 34 versions & 5 rubygems