Class: Backup::S3Object

Inherits:
AbstractStorageObject show all
Defined in:
lib/backup-agent/s3_object.rb

Instance Attribute Summary

Attributes inherited from AbstractStorageObject

#env, #key, #storage

Instance Method Summary collapse

Constructor Details

#initializeS3Object



3
4
5
6
7
# File 'lib/backup-agent/s3_object.rb', line 3

def initialize(*)
  super
  @object = env.fetch(:object)
  @bucket = env.fetch(:bucket)
end

Instance Method Details

#deleteObject



13
14
15
# File 'lib/backup-agent/s3_object.rb', line 13

def delete
  storage.delete(key)
end

#last_modifiedObject



9
10
11
# File 'lib/backup-agent/s3_object.rb', line 9

def last_modified
  @object.last_modified
end