Class: Modern::App::RequestHandling::PartialRequestContainer
- Inherits:
-
Object
- Object
- Modern::App::RequestHandling::PartialRequestContainer
- Defined in:
- lib/modern/app/request_handling/request_container.rb
Overview
Encapsulates all non-derived portions of the request to run security actions inside of it.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#configuration ⇒ Object
readonly
Returns the value of attribute configuration.
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
-
#request ⇒ Object
readonly
Returns the value of attribute request.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
-
#route ⇒ Object
readonly
Returns the value of attribute route.
-
#services ⇒ Object
readonly
Returns the value of attribute services.
Instance Method Summary collapse
-
#initialize(logger, configuration, services, route, request, response) ⇒ PartialRequestContainer
constructor
A new instance of PartialRequestContainer.
- #with_logger_fields(fields = {}) ⇒ Object
Constructor Details
#initialize(logger, configuration, services, route, request, response) ⇒ PartialRequestContainer
Returns a new instance of PartialRequestContainer.
17 18 19 20 21 22 23 24 25 |
# File 'lib/modern/app/request_handling/request_container.rb', line 17 def initialize(logger, configuration, services, route, request, response) @logger = logger @configuration = configuration @services = services @route = route @request = request @response = response end |
Instance Attribute Details
#configuration ⇒ Object (readonly)
Returns the value of attribute configuration.
10 11 12 |
# File 'lib/modern/app/request_handling/request_container.rb', line 10 def configuration @configuration end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
9 10 11 |
# File 'lib/modern/app/request_handling/request_container.rb', line 9 def logger @logger end |
#request ⇒ Object (readonly)
Returns the value of attribute request.
14 15 16 |
# File 'lib/modern/app/request_handling/request_container.rb', line 14 def request @request end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
15 16 17 |
# File 'lib/modern/app/request_handling/request_container.rb', line 15 def response @response end |
#route ⇒ Object (readonly)
Returns the value of attribute route.
12 13 14 |
# File 'lib/modern/app/request_handling/request_container.rb', line 12 def route @route end |
#services ⇒ Object (readonly)
Returns the value of attribute services.
11 12 13 |
# File 'lib/modern/app/request_handling/request_container.rb', line 11 def services @services end |
Instance Method Details
#with_logger_fields(fields = {}) ⇒ Object
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/modern/app/request_handling/request_container.rb', line 27 def with_logger_fields(fields = {}) original_logger = @logger @logger = original_logger.child(fields) ret = yield @logger = original_logger ret end |