Class: Pact::MockService::Run
- Inherits:
-
Object
- Object
- Pact::MockService::Run
- Defined in:
- lib/pact/mock_service/run.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(options) ⇒ Run
constructor
A new instance of Run.
Constructor Details
#initialize(options) ⇒ Run
Returns a new instance of Run.
16 17 18 |
# File 'lib/pact/mock_service/run.rb', line 16 def initialize @options = end |
Class Method Details
.call(options) ⇒ Object
12 13 14 |
# File 'lib/pact/mock_service/run.rb', line 12 def self.call new().call end |
Instance Method Details
#call ⇒ Object
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/pact/mock_service/run.rb', line 20 def call require 'pact/mock_service/app' trap(:INT) { call_shutdown_hooks } trap(:TERM) { call_shutdown_hooks } require_monkeypatch Rack::Handler::WEBrick.run(mock_service, **webbrick_opts) end |