lib/backup/package.rb in backup-3.3.2 vs lib/backup/package.rb in backup-3.4.0
- old
+ new
@@ -3,11 +3,11 @@
module Backup
class Package
##
# The time when the backup initiated (in format: 2011.02.20.03.29.59)
- attr_reader :time
+ attr_accessor :time
##
# The trigger which initiated the backup process
attr_reader :trigger
@@ -22,15 +22,14 @@
##
# 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
+ @version = Version.current
end
def filenames
if chunk_suffixes.empty?
[basename]
@@ -38,10 +37,10 @@
chunk_suffixes.map {|suffix| "#{ basename }-#{ suffix }" }
end
end
def basename
- "#{ time }.#{ trigger }.#{ extension }"
+ "#{ trigger }.#{ extension }"
end
end
end