Class: FakeHTTP::Client

Inherits:
Object
  • Object
show all
Includes:
HTTP::Chainable
Defined in:
lib/fake_http.rb

Instance Method Summary collapse

Constructor Details

#initialize(options, builder:) ⇒ Client

Returns a new instance of Client.



22
23
24
# File 'lib/fake_http.rb', line 22

def initialize(options, builder:)
  @options, @builder = options, builder
end

Instance Method Details

#branch(options) ⇒ Object



30
31
32
# File 'lib/fake_http.rb', line 30

def branch(options)
  self.class.new(@options.merge(options), builder: @builder)
end

#request(*args) ⇒ Object



26
27
28
# File 'lib/fake_http.rb', line 26

def request(*args)
  @builder.request(*args)
end