Class: Protocol::HTTP::Body::Head
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Readable
#call, #close, #each, #finish, #join, #read, #stream?
Constructor Details
#initialize(length) ⇒ Head
Returns a new instance of Head.
20
21
22
|
# File 'lib/protocol/http/body/head.rb', line 20
def initialize(length)
@length = length
end
|
Class Method Details
.for(body) ⇒ Object
12
13
14
15
16
17
18
|
# File 'lib/protocol/http/body/head.rb', line 12
def self.for(body)
head = self.new(body.length)
body.close
return head
end
|
Instance Method Details
#empty? ⇒ Boolean
24
25
26
|
# File 'lib/protocol/http/body/head.rb', line 24
def empty?
true
end
|
#length ⇒ Object
32
33
34
|
# File 'lib/protocol/http/body/head.rb', line 32
def length
@length
end
|
#ready? ⇒ Boolean
28
29
30
|
# File 'lib/protocol/http/body/head.rb', line 28
def ready?
true
end
|