Class: Pact::MockService::Spawn
- Inherits:
-
Object
- Object
- Pact::MockService::Spawn
- Defined in:
- lib/pact/mock_service/spawn.rb
Instance Attribute Summary collapse
-
#consumer ⇒ Object
readonly
Returns the value of attribute consumer.
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#port ⇒ Object
readonly
Returns the value of attribute port.
-
#provider ⇒ Object
readonly
Returns the value of attribute provider.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(consumer, provider, host, port, options) ⇒ Spawn
constructor
A new instance of Spawn.
Constructor Details
#initialize(consumer, provider, host, port, options) ⇒ Spawn
Returns a new instance of Spawn.
17 18 19 20 21 22 23 |
# File 'lib/pact/mock_service/spawn.rb', line 17 def initialize consumer, provider, host, port, @consumer = consumer @provider = provider @host = host @port = port @options = end |
Instance Attribute Details
#consumer ⇒ Object (readonly)
Returns the value of attribute consumer.
15 16 17 |
# File 'lib/pact/mock_service/spawn.rb', line 15 def consumer @consumer end |
#host ⇒ Object (readonly)
Returns the value of attribute host.
15 16 17 |
# File 'lib/pact/mock_service/spawn.rb', line 15 def host @host end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
15 16 17 |
# File 'lib/pact/mock_service/spawn.rb', line 15 def @options end |
#port ⇒ Object (readonly)
Returns the value of attribute port.
15 16 17 |
# File 'lib/pact/mock_service/spawn.rb', line 15 def port @port end |
#provider ⇒ Object (readonly)
Returns the value of attribute provider.
15 16 17 |
# File 'lib/pact/mock_service/spawn.rb', line 15 def provider @provider end |
Class Method Details
.call(consumer, provider, host, port, options) ⇒ Object
11 12 13 |
# File 'lib/pact/mock_service/spawn.rb', line 11 def self.call consumer, provider, host, port, new(consumer, provider, host, port, ).call end |
Instance Method Details
#call ⇒ Object
25 26 27 28 29 30 |
# File 'lib/pact/mock_service/spawn.rb', line 25 def call mock_service = build_app start_mock_service mock_service, port puts "Started mock service for #{provider} on #{port}" mock_service end |