Class: HttpRouter::Response
- Inherits:
-
Struct
- Object
- Struct
- HttpRouter::Response
- Defined in:
- lib/http_router/response.rb
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#path ⇒ Object
Returns the value of attribute path.
-
#request ⇒ Object
Returns the value of attribute request.
Instance Method Summary collapse
-
#initialize(request, path) ⇒ Response
constructor
A new instance of Response.
- #param_values ⇒ Object
- #route ⇒ Object
Constructor Details
#initialize(request, path) ⇒ Response
Returns a new instance of Response.
4 5 6 7 |
# File 'lib/http_router/response.rb', line 4 def initialize(request, path) super(request, path) @params = path.hashify_params(request.params) end |
Instance Attribute Details
#params ⇒ Object (readonly)
Returns the value of attribute params.
3 4 5 |
# File 'lib/http_router/response.rb', line 3 def params @params end |
#path ⇒ Object
Returns the value of attribute path
2 3 4 |
# File 'lib/http_router/response.rb', line 2 def path @path end |
#request ⇒ Object
Returns the value of attribute request
2 3 4 |
# File 'lib/http_router/response.rb', line 2 def request @request end |
Instance Method Details
#param_values ⇒ Object
13 14 15 |
# File 'lib/http_router/response.rb', line 13 def param_values request.params end |
#route ⇒ Object
9 10 11 |
# File 'lib/http_router/response.rb', line 9 def route path.route end |