Class: IntervalResponse::Empty
Overview
Serves out a response that is of size 0
Constant Summary
ToRackResponseTriplet::CHUNK_SIZE
Instance Method Summary
collapse
#to_rack_response_triplet
Constructor Details
#initialize(interval_map) ⇒ Empty
Returns a new instance of Empty.
5
6
7
|
# File 'lib/interval_response/empty.rb', line 5
def initialize(interval_map)
@interval_map = interval_map
end
|
Instance Method Details
#content_length ⇒ Object
17
18
19
|
# File 'lib/interval_response/empty.rb', line 17
def content_length
0
end
|
#each ⇒ Object
9
10
11
|
# File 'lib/interval_response/empty.rb', line 9
def each
end
|
21
22
23
24
25
26
27
28
|
# File 'lib/interval_response/empty.rb', line 21
def
{
'Accept-Ranges' => 'bytes',
'Content-Length' => '0',
'Content-Type' => 'binary/octet-stream',
'ETag' => @interval_map.etag,
}
end
|
#status_code ⇒ Object
13
14
15
|
# File 'lib/interval_response/empty.rb', line 13
def status_code
200
end
|