Sha256: 58062472df294b6ece94629519e1c7c450b444b4d12e5f48f878b5f2fee23b91
Contents?: true
Size: 633 Bytes
Versions: 3
Compression:
Stored size: 633 Bytes
Contents
class Roda module RodaPlugins # The response_request plugin gives the response access to the # related request instance via the #request method. # # Example: # # plugin :response_request module ResponseRequest module InstanceMethods # Set the response's request to the current request. def initialize(env) super @_response.request = @_request end end module ResponseMethods # The request related to this response. attr_accessor :request end end register_plugin(:response_request, ResponseRequest) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
roda-2.9.0 | lib/roda/plugins/response_request.rb |
roda-2.8.0 | lib/roda/plugins/response_request.rb |
roda-2.7.0 | lib/roda/plugins/response_request.rb |