Class: RackDoubles::Middleware::Response
- Inherits:
-
Object
- Object
- RackDoubles::Middleware::Response
- Defined in:
- lib/rack_doubles/middleware.rb
Instance Method Summary collapse
-
#initialize(responses, path) ⇒ Response
constructor
A new instance of Response.
- #to_return(status, headers, body) ⇒ Object
Constructor Details
#initialize(responses, path) ⇒ Response
Returns a new instance of Response.
89 90 91 |
# File 'lib/rack_doubles/middleware.rb', line 89 def initialize(responses, path) @responses, @path = responses, path end |
Instance Method Details
#to_return(status, headers, body) ⇒ Object
93 94 95 |
# File 'lib/rack_doubles/middleware.rb', line 93 def to_return(status, headers, body) @responses[@path] = [status, headers, body] end |