Class: Pact::Consumer::Configuration::MockService
- Inherits:
-
Object
- Object
- Pact::Consumer::Configuration::MockService
- Extended by:
- DSL
- Defined in:
- lib/pact/consumer/configuration/mock_service.rb
Instance Attribute Summary collapse
-
#consumer_name ⇒ Object
Returns the value of attribute consumer_name.
-
#host ⇒ Object
Returns the value of attribute host.
-
#pact_specification_version ⇒ Object
Returns the value of attribute pact_specification_version.
-
#port ⇒ Object
Returns the value of attribute port.
-
#provider_name ⇒ Object
Returns the value of attribute provider_name.
-
#standalone ⇒ Object
Returns the value of attribute standalone.
-
#verify ⇒ Object
Returns the value of attribute verify.
Instance Method Summary collapse
- #finalize ⇒ Object
-
#initialize(name, consumer_name, provider_name) ⇒ MockService
constructor
A new instance of MockService.
Constructor Details
#initialize(name, consumer_name, provider_name) ⇒ MockService
Returns a new instance of MockService.
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/pact/consumer/configuration/mock_service.rb', line 16 def initialize name, consumer_name, provider_name @name = name @consumer_name = consumer_name @provider_name = provider_name @port = nil @host = "localhost" @standalone = false @verify = true @pact_specification_version = '2' @finalized = false end |
Instance Attribute Details
#consumer_name ⇒ Object
Returns the value of attribute consumer_name.
14 15 16 |
# File 'lib/pact/consumer/configuration/mock_service.rb', line 14 def consumer_name @consumer_name end |
#host ⇒ Object
Returns the value of attribute host.
14 15 16 |
# File 'lib/pact/consumer/configuration/mock_service.rb', line 14 def host @host end |
#pact_specification_version ⇒ Object
Returns the value of attribute pact_specification_version.
14 15 16 |
# File 'lib/pact/consumer/configuration/mock_service.rb', line 14 def pact_specification_version @pact_specification_version end |
#port ⇒ Object
Returns the value of attribute port.
14 15 16 |
# File 'lib/pact/consumer/configuration/mock_service.rb', line 14 def port @port end |
#provider_name ⇒ Object
Returns the value of attribute provider_name.
14 15 16 |
# File 'lib/pact/consumer/configuration/mock_service.rb', line 14 def provider_name @provider_name end |
#standalone ⇒ Object
Returns the value of attribute standalone.
14 15 16 |
# File 'lib/pact/consumer/configuration/mock_service.rb', line 14 def standalone @standalone end |
#verify ⇒ Object
Returns the value of attribute verify.
14 15 16 |
# File 'lib/pact/consumer/configuration/mock_service.rb', line 14 def verify @verify end |
Instance Method Details
#finalize ⇒ Object
50 51 52 53 54 55 |
# File 'lib/pact/consumer/configuration/mock_service.rb', line 50 def finalize raise 'Already finalized!' if @finalized register_mock_service configure_consumer_contract_builder @finalized = true end |