Class: Fog::Storage::AWS::Version

Inherits:
Model
  • Object
show all
Defined in:
lib/fog/aws/models/storage/version.rb

Instance Method Summary collapse

Instance Method Details

#destroyObject



21
22
23
24
25
26
27
# File 'lib/fog/aws/models/storage/version.rb', line 21

def destroy
  if collection.file
    collection.service.delete_object(collection.file.directory.key, key, 'versionId' => version)
  else
    collection.service.delete_object(collection.directory.key, key, 'versionId' => version)
  end
end

#fileObject



13
14
15
16
17
18
19
# File 'lib/fog/aws/models/storage/version.rb', line 13

def file
  @file ||= if collection.file
    collection.file.directory.files.get(key, 'versionId' => version)
  else
    collection.directory.files.get(key, 'versionId' => version)
  end
end