Class: Canistor::Storage::DeleteMarker
- Inherits:
-
Object
- Object
- Canistor::Storage::DeleteMarker
- Defined in:
- lib/canistor/storage/delete_marker.rb
Overview
Represents the non-existence of an object on a versioned bucket.
Instance Attribute Summary collapse
-
#version_id ⇒ Object
readonly
Returns the value of attribute version_id.
Instance Method Summary collapse
- #delete(context, subject) ⇒ Object
- #get(context, subject) ⇒ Object
- #head(context, subject) ⇒ Object
- #headers ⇒ Object
-
#initialize ⇒ DeleteMarker
constructor
A new instance of DeleteMarker.
Constructor Details
#initialize ⇒ DeleteMarker
Returns a new instance of DeleteMarker.
9 10 11 |
# File 'lib/canistor/storage/delete_marker.rb', line 9 def initialize @version_id = generate_version_id end |
Instance Attribute Details
#version_id ⇒ Object (readonly)
Returns the value of attribute version_id.
7 8 9 |
# File 'lib/canistor/storage/delete_marker.rb', line 7 def version_id @version_id end |
Instance Method Details
#delete(context, subject) ⇒ Object
28 29 30 |
# File 'lib/canistor/storage/delete_marker.rb', line 28 def delete(context, subject) context.http_response.signal_headers(200, headers) end |
#get(context, subject) ⇒ Object
24 25 26 |
# File 'lib/canistor/storage/delete_marker.rb', line 24 def get(context, subject) Canistor::ErrorHandler.serve_no_such_key(context, subject) end |
#head(context, subject) ⇒ Object
20 21 22 |
# File 'lib/canistor/storage/delete_marker.rb', line 20 def head(context, subject) Canistor::ErrorHandler.serve_no_such_key(context, subject) end |
#headers ⇒ Object
13 14 15 16 17 18 |
# File 'lib/canistor/storage/delete_marker.rb', line 13 def headers { 'x-amz-delete-marker' => 'true', 'x-amz-version-id' => version_id } end |