Sha256: 15ebd405d82bc4648f050917fa8530d263cf7b5f52c7bd3fda1489d95b5beb90
Contents?: true
Size: 1.06 KB
Versions: 13
Compression:
Stored size: 1.06 KB
Contents
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 = [] @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 def time_as_object Time.strptime(time, "%Y.%m.%d.%H.%M.%S") end end end
Version data entries
13 entries across 13 versions & 4 rubygems