Class: ActionDispatch::Response::BodyBuster

Inherits:
Object
  • Object
show all
Defined in:
actionpack/lib/action_dispatch/http/response.rb

Overview

:nodoc:

Instance Method Summary (collapse)

Constructor Details

- (BodyBuster) initialize(response)



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