Class: Pact::Consumer::Request::Actual
- Inherits:
-
Request::Base
- Object
- Request::Base
- Pact::Consumer::Request::Actual
- Defined in:
- lib/pact/consumer/request.rb
Instance Attribute Summary
Attributes inherited from Request::Base
#body, #headers, #method, #options, #path, #query
Class Method Summary collapse
Methods inherited from Request::Base
#content_type, #content_type?, #full_path, #initialize, #method_and_path, #modifies_resource?, #specified?, #to_hash
Methods included from SymbolizeKeys
Constructor Details
This class inherits a constructor from Pact::Request::Base
Class Method Details
.from_hash(hash) ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/pact/consumer/request.rb', line 9 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 |