Sha256: aab75e872403670d39d431e8293d3e530187469ca949d95cfe2bc6fc732a74fa
Contents?: true
Size: 952 Bytes
Versions: 18
Compression:
Stored size: 952 Bytes
Contents
# encoding: utf-8 module Backup class Package ## # The time when the backup initiated (in format: 2011.02.20.03.29.59) attr_reader :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 ## # The version of Backup used to create the package attr_reader :version def initialize(model) @time = model.time @trigger = model.trigger @extension = 'tar' @chunk_suffixes = Array.new @version = Backup::Version.current end def filenames if chunk_suffixes.empty? [basename] else chunk_suffixes.map {|suffix| "#{ basename }-#{ suffix }" } end end def basename "#{ time }.#{ trigger }.#{ extension }" end end end
Version data entries
18 entries across 18 versions & 3 rubygems