Class: RackStubs::Middleware::PathSpecification
- Inherits:
-
Object
- Object
- RackStubs::Middleware::PathSpecification
- Defined in:
- lib/rack_stubs/middleware.rb
Instance Method Summary collapse
-
#initialize(path, http_verb, middleware) ⇒ PathSpecification
constructor
A new instance of PathSpecification.
- #returns(status, headers, body) ⇒ Object
Constructor Details
#initialize(path, http_verb, middleware) ⇒ PathSpecification
Returns a new instance of PathSpecification.
44 45 46 |
# File 'lib/rack_stubs/middleware.rb', line 44 def initialize(path, http_verb, middleware) @path, @http_verb, @middleware = path, http_verb, middleware end |
Instance Method Details
#returns(status, headers, body) ⇒ Object
48 49 50 |
# File 'lib/rack_stubs/middleware.rb', line 48 def returns(status, headers, body) @middleware.setup_stub(@path, { @http_verb => [status, headers, body] }) end |