Sha256: 8a0f61ac12fe58caec0ceec9d7bbddf77f96a1dc7264abf9f3d7ee10a9aef722
Contents?: true
Size: 424 Bytes
Versions: 3
Compression:
Stored size: 424 Bytes
Contents
module Pacto class ContractFactory def self.build_from_file(contract_path, host, file_pre_processor) contract_definition_expanded = file_pre_processor.process(File.read(contract_path)) definition = JSON.parse(contract_definition_expanded) request = Request.new(host, definition["request"]) response = Response.new(definition["response"]) Contract.new(request, response) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
pacto-0.2.3 | lib/pacto/contract_factory.rb |
pacto-0.2.2 | lib/pacto/contract_factory.rb |
pacto-0.2.1 | lib/pacto/contract_factory.rb |