Sha256: e3284948cdd0e9619b6b45eed964f65ab69d9bb17d2bdf5e8fd6a3caeb8ea640

Contents?: true

Size: 623 Bytes

Versions: 10

Compression:

Stored size: 623 Bytes

Contents

require 'pact/shared/request'
require 'pact/shared/key_not_found'

module Pact
  module Consumer
    module Request
      class Actual < Pact::Request::Base

        def self.from_hash(hash)
          sym_hash = symbolize_keys hash
          method = sym_hash.fetch(:method)
          path = sym_hash.fetch(:path)
          query = sym_hash.fetch(:query)
          headers = sym_hash.fetch(:headers)
          body = sym_hash.fetch(:body, nil)
          new(method, path, headers, body, query)
        end

        protected

        def self.key_not_found
          nil
        end       
      end      
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
pact-1.0.22 lib/pact/consumer/request.rb
pact-1.0.21 lib/pact/consumer/request.rb
pact-1.0.20 lib/pact/consumer/request.rb
pact-1.0.19 lib/pact/consumer/request.rb
pact-1.0.18 lib/pact/consumer/request.rb
pact-1.0.15 lib/pact/consumer/request.rb
pact-1.0.13 lib/pact/consumer/request.rb
pact-1.0.12 lib/pact/consumer/request.rb
pact-1.0.11 lib/pact/consumer/request.rb
pact-1.0.10 lib/pact/consumer/request.rb