Sha256: 4b8c931ae199b32346a62a05969b157aca80134a0d336e9bb61da33713761d23

Contents?: true

Size: 518 Bytes

Versions: 144

Compression:

Stored size: 518 Bytes

Contents

require 'pact/symbolize_keys'

module Pact
  class ServiceProvider
    include SymbolizeKeys

    attr_accessor :name
    def initialize options
      @name = options[:name] || '[provider name unknown - please update the pact gem in the consumer project to the latest version and regenerate the pacts]'
    end

    def to_s
      name
    end

    def to_hash
      {name: name}
    end

    def as_json options = {}
      to_hash
    end

    def self.from_hash hash
      new(symbolize_keys(hash))
    end
  end
end

Version data entries

144 entries across 144 versions & 3 rubygems

Version Path
pact-support-1.3.0 lib/pact/consumer_contract/service_provider.rb
pact-support-1.2.99.alpha.1 lib/pact/consumer_contract/service_provider.rb
pact-support-1.3.0.alpha.2 lib/pact/consumer_contract/service_provider.rb
pact-support-1.3.0.alpha.1 lib/pact/consumer_contract/service_provider.rb
pact-support-1.2.5 lib/pact/consumer_contract/service_provider.rb
pact-support-1.2.4 lib/pact/consumer_contract/service_provider.rb
pact-support-1.2.3 lib/pact/consumer_contract/service_provider.rb
pact-support-1.2.2 lib/pact/consumer_contract/service_provider.rb
pact-support-1.2.1 lib/pact/consumer_contract/service_provider.rb
pact-support-1.2.0 lib/pact/consumer_contract/service_provider.rb
pact-support-1.1.8 lib/pact/consumer_contract/service_provider.rb
pact-support-1.1.7 lib/pact/consumer_contract/service_provider.rb
pact-support-1.1.6 lib/pact/consumer_contract/service_provider.rb
pact-support-1.1.5 lib/pact/consumer_contract/service_provider.rb
pact-support-1.1.4 lib/pact/consumer_contract/service_provider.rb
pact-support-1.1.3 lib/pact/consumer_contract/service_provider.rb
pact-support-1.1.2 lib/pact/consumer_contract/service_provider.rb
pact-support-1.1.1 lib/pact/consumer_contract/service_provider.rb
pact-support-1.1.0 lib/pact/consumer_contract/service_provider.rb
pact-support-1.0.1 lib/pact/consumer_contract/service_provider.rb