Class: ActionController::StringCoercion

Inherits:
Object
  • Object
show all
Defined in:
lib/action_controller/string_coercion.rb

Defined Under Namespace

Classes: UglyBody

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ StringCoercion

Returns a new instance of StringCoercion.



20
21
22
# File 'lib/action_controller/string_coercion.rb', line 20

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



24
25
26
27
# File 'lib/action_controller/string_coercion.rb', line 24

def call(env)
  status, headers, body = @app.call(env)
  [status, headers, UglyBody.new(body)]
end