Class: HTTP::Fake::Requester

Inherits:
Object
  • Object
show all
Includes:
Chainable
Defined in:
lib/http/fake/requester.rb

Overview

Handles an incoming request.

Instance Method Summary collapse

Constructor Details

#initialize(defaults = {}, builder: Builder.new) ⇒ Requester

Returns a new instance of Requester.



9
10
11
12
# File 'lib/http/fake/requester.rb', line 9

def initialize defaults = {}, builder: Builder.new
  @defaults = defaults
  @builder = builder
end

Instance Method Details

#request(verb, uri, arguments = {}) ⇒ Object



14
# File 'lib/http/fake/requester.rb', line 14

def request(verb, uri, arguments = {}) = builder.request verb, uri, defaults.merge(arguments)