Class: Rack::Chunked::Body
- Inherits:
-
Object
- Object
- Rack::Chunked::Body
- Defined in:
- lib/rack/chunked.rb
Instance Method Summary collapse
- #close ⇒ Object
- #each ⇒ Object
-
#initialize(body) ⇒ Body
constructor
A new instance of Body.
Constructor Details
#initialize(body) ⇒ Body
Returns a new instance of Body.
5 6 7 |
# File 'lib/rack/chunked.rb', line 5 def initialize(body) @body = body end |
Instance Method Details
#close ⇒ Object
13 14 15 |
# File 'lib/rack/chunked.rb', line 13 def close @body.close if @body.respond_to?(:close) end |
#each ⇒ Object
9 10 11 |
# File 'lib/rack/chunked.rb', line 9 def each @body.each {|chunk| yield chunk} end |