Module: HttpStub::Server::Application::RequestSupport
- Included in:
- Application
- Defined in:
- lib/http_stub/server/application/request_support.rb
Instance Attribute Summary collapse
-
#http_stub_request ⇒ Object
readonly
Returns the value of attribute http_stub_request.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#http_stub_request ⇒ Object (readonly)
Returns the value of attribute http_stub_request.
11 12 13 |
# File 'lib/http_stub/server/application/request_support.rb', line 11 def http_stub_request @http_stub_request end |
Class Method Details
.included(application) ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/http_stub/server/application/request_support.rb', line 22 def self.included(application) application.instance_eval do def self.any_request_method(path, opts={}, &block) STUBBABLE_REQUEST_METHODS.each { |request_method| self.send(request_method, path, opts, &block) } end before { establish_http_stub_request } end end |
Instance Method Details
#establish_http_stub_request ⇒ Object
18 19 20 |
# File 'lib/http_stub/server/application/request_support.rb', line 18 def establish_http_stub_request @http_stub_request = @request_factory.create(request, params, logger) end |