Class: Async::HTTP::Body::Remainder
- Defined in:
- lib/async/http/body/fixed.rb
Instance Method Summary collapse
- #empty? ⇒ Boolean
-
#initialize(stream) ⇒ Remainder
constructor
A new instance of Remainder.
- #inspect ⇒ Object
- #join ⇒ Object
- #read ⇒ Object
- #stop(error) ⇒ Object
Methods inherited from Readable
Constructor Details
#initialize(stream) ⇒ Remainder
Returns a new instance of Remainder.
68 69 70 |
# File 'lib/async/http/body/fixed.rb', line 68 def initialize(stream) @stream = stream end |
Instance Method Details
#empty? ⇒ Boolean
72 73 74 |
# File 'lib/async/http/body/fixed.rb', line 72 def empty? @stream.closed? end |
#inspect ⇒ Object
88 89 90 |
# File 'lib/async/http/body/fixed.rb', line 88 def inspect "\#<#{self.class} #{@stream.closed? ? 'closed' : 'open'}>" end |
#join ⇒ Object
84 85 86 |
# File 'lib/async/http/body/fixed.rb', line 84 def join read end |
#read ⇒ Object
80 81 82 |
# File 'lib/async/http/body/fixed.rb', line 80 def read @stream.read_partial end |
#stop(error) ⇒ Object
76 77 78 |
# File 'lib/async/http/body/fixed.rb', line 76 def stop(error) @stream.close end |