Class: Async::HTTP::Body::Remainder
Instance Method Summary
collapse
Methods inherited from Readable
#close, #each, #length, #stop
Constructor Details
#initialize(stream) ⇒ Remainder
Returns a new instance of Remainder.
64
65
66
|
# File 'lib/async/http/body/fixed.rb', line 64
def initialize(stream)
@stream = stream
end
|
Instance Method Details
#empty? ⇒ Boolean
68
69
70
|
# File 'lib/async/http/body/fixed.rb', line 68
def empty?
@stream.closed?
end
|
#inspect ⇒ Object
80
81
82
|
# File 'lib/async/http/body/fixed.rb', line 80
def inspect
"\#<#{self.class} #{@stream.closed? ? 'closed' : 'open'}>"
end
|
#join ⇒ Object
76
77
78
|
# File 'lib/async/http/body/fixed.rb', line 76
def join
read
end
|
#read ⇒ Object
72
73
74
|
# File 'lib/async/http/body/fixed.rb', line 72
def read
@stream.read unless @stream.closed?
end
|