Class: ActionDispatch::Response::BodyBuster
- Inherits:
-
Object
- Object
- ActionDispatch::Response::BodyBuster
- Defined in:
- actionpack/lib/action_dispatch/http/response.rb
Overview
:nodoc:
Instance Method Summary (collapse)
- - (Object) bust(body)
-
- (BodyBuster) initialize(response)
constructor
A new instance of BodyBuster.
- - (Object) write(string)
Constructor Details
- (BodyBuster) initialize(response)
A new instance of BodyBuster
119 120 121 122 |
# File 'actionpack/lib/action_dispatch/http/response.rb', line 119 def initialize(response) @response = response @body = "" end |
Instance Method Details
- (Object) bust(body)
124 125 126 127 128 |
# File 'actionpack/lib/action_dispatch/http/response.rb', line 124 def bust(body) body.call(@response, self) body.close if body.respond_to?(:close) @body end |
- (Object) write(string)
130 131 132 |
# File 'actionpack/lib/action_dispatch/http/response.rb', line 130 def write(string) @body << string.to_s end |