Class: Pact::Provider::Configuration::ServiceProviderDSL

Inherits:
Object
  • Object
show all
Extended by:
DSL
Defined in:
lib/pact/provider/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from DSL

build, dsl

Constructor Details

#initialize(name) ⇒ ServiceProviderDSL

Returns a new instance of ServiceProviderDSL.



92
93
94
95
# File 'lib/pact/provider/configuration.rb', line 92

def initialize name
  @name = name
  @app_block = nil
end

Instance Attribute Details

#app_blockObject

Returns the value of attribute app_block.



90
91
92
# File 'lib/pact/provider/configuration.rb', line 90

def app_block
  @app_block
end

#nameObject

Returns the value of attribute name.



90
91
92
# File 'lib/pact/provider/configuration.rb', line 90

def name
  @name
end

Instance Method Details

#create_pact_verification(consumer_name, options, &block) ⇒ Object



107
108
109
# File 'lib/pact/provider/configuration.rb', line 107

def create_pact_verification consumer_name, options, &block
  PactVerification.build(consumer_name, options, &block)
end

#finalizeObject



111
112
113
114
# File 'lib/pact/provider/configuration.rb', line 111

def finalize
  validate
  create_service_provider
end