Class: Deas::RequestData
- Inherits:
-
Object
- Object
- Deas::RequestData
- Defined in:
- lib/deas/request_data.rb
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
The rack app uses this to “compile” the request-related data.
-
#request ⇒ Object
readonly
The rack app uses this to “compile” the request-related data.
-
#response ⇒ Object
readonly
The rack app uses this to “compile” the request-related data.
-
#route_path ⇒ Object
readonly
The rack app uses this to “compile” the request-related data.
Instance Method Summary collapse
- #==(other_request_data) ⇒ Object
-
#initialize(args) ⇒ RequestData
constructor
A new instance of RequestData.
Constructor Details
#initialize(args) ⇒ RequestData
Returns a new instance of RequestData.
13 14 15 16 17 18 |
# File 'lib/deas/request_data.rb', line 13 def initialize(args) @request = args[:request] @response = args[:response] @params = args[:params] @route_path = args[:route_path] end |
Instance Attribute Details
#params ⇒ Object (readonly)
The rack app uses this to “compile” the request-related data. The goal here is to wrap up these (and any future) request objects into a struct object to make them available to the runner/handler. This is also to decouple the rack app from the handlers (we can use any rack app as long as they provide this data).
11 12 13 |
# File 'lib/deas/request_data.rb', line 11 def params @params end |
#request ⇒ Object (readonly)
The rack app uses this to “compile” the request-related data. The goal here is to wrap up these (and any future) request objects into a struct object to make them available to the runner/handler. This is also to decouple the rack app from the handlers (we can use any rack app as long as they provide this data).
11 12 13 |
# File 'lib/deas/request_data.rb', line 11 def request @request end |
#response ⇒ Object (readonly)
The rack app uses this to “compile” the request-related data. The goal here is to wrap up these (and any future) request objects into a struct object to make them available to the runner/handler. This is also to decouple the rack app from the handlers (we can use any rack app as long as they provide this data).
11 12 13 |
# File 'lib/deas/request_data.rb', line 11 def response @response end |
#route_path ⇒ Object (readonly)
The rack app uses this to “compile” the request-related data. The goal here is to wrap up these (and any future) request objects into a struct object to make them available to the runner/handler. This is also to decouple the rack app from the handlers (we can use any rack app as long as they provide this data).
11 12 13 |
# File 'lib/deas/request_data.rb', line 11 def route_path @route_path end |
Instance Method Details
#==(other_request_data) ⇒ Object
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/deas/request_data.rb', line 20 def ==(other_request_data) if other_request_data.kind_of?(RequestData) self.request == other_request_data.request && self.response == other_request_data.response && self.params == other_request_data.params && self.route_path == other_request_data.route_path else super end end |