Module: Roda::RodaPlugins::ResponseRequest::InstanceMethods
- Defined in:
- lib/roda/plugins/response_request.rb
Overview
This isn't set because it breaks usage with the error_handler/class_level_routing plugins and the shape_friendly plugin, due to those calling RodaResponse#initialize, which would reset @request to nil. It isn't strictly necessary to set this for shape friendliness, as the Roda#initialize sets it directly after creating the RodaRequest, so in normal use, the instance variable will already be set. RESPONSE_INSTANCE_VARIABLES = [:@request].freeze
Instance Method Summary collapse
-
#initialize(env) ⇒ Object
Set the response's request to the current request.
Instance Method Details
#initialize(env) ⇒ Object
Set the response's request to the current request.
22 23 24 25 |
# File 'lib/roda/plugins/response_request.rb', line 22 def initialize(env) super @_response.request = @_request end |