Class: Rack::Chunked::Body

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/chunked.rb

Instance Method Summary collapse

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

#closeObject



13
14
15
# File 'lib/rack/chunked.rb', line 13

def close
  @body.close if @body.respond_to?(:close)
end

#eachObject



9
10
11
# File 'lib/rack/chunked.rb', line 9

def each
  @body.each {|chunk| yield chunk}
end