Class: Protocol::Rack::Body::Streaming::Output
- Inherits:
-
Object
- Object
- Protocol::Rack::Body::Streaming::Output
- Defined in:
- lib/protocol/rack/body/streaming.rb
Instance Method Summary collapse
- #close ⇒ Object
- #empty? ⇒ Boolean
-
#initialize(block) ⇒ Output
constructor
A new instance of Output.
- #write(chunk) ⇒ Object
Constructor Details
#initialize(block) ⇒ Output
Returns a new instance of Output.
53 54 55 |
# File 'lib/protocol/rack/body/streaming.rb', line 53 def initialize(block) @block = block end |
Instance Method Details
#close ⇒ Object
61 62 63 |
# File 'lib/protocol/rack/body/streaming.rb', line 61 def close @block = nil end |
#empty? ⇒ Boolean
65 66 67 |
# File 'lib/protocol/rack/body/streaming.rb', line 65 def empty? true end |
#write(chunk) ⇒ Object
57 58 59 |
# File 'lib/protocol/rack/body/streaming.rb', line 57 def write(chunk) @block.call(chunk) end |