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.
37
38
39
|
# File 'lib/protocol/http/body/head.rb', line 37
def initialize(length)
@length = length
end
|
Class Method Details
.for(body) ⇒ Object
29
30
31
32
33
34
35
|
# File 'lib/protocol/http/body/head.rb', line 29
def self.for(body)
head = self.new(body.length)
body.close
return head
end
|
Instance Method Details
#empty? ⇒ Boolean
41
42
43
|
# File 'lib/protocol/http/body/head.rb', line 41
def empty?
true
end
|
#length ⇒ Object
49
50
51
|
# File 'lib/protocol/http/body/head.rb', line 49
def length
@length
end
|
#ready? ⇒ Boolean
45
46
47
|
# File 'lib/protocol/http/body/head.rb', line 45
def ready?
true
end
|