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.
18 19 20 |
# File 'lib/pact/mock_service/run.rb', line 18 def initialize = end |
Class Method Details
.call(options) ⇒ Object
14 15 16 |
# File 'lib/pact/mock_service/run.rb', line 14 def self.call new().call end |
Instance Method Details
#call ⇒ Object
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/pact/mock_service/run.rb', line 22 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 |