Module: Manticore::Facade::ClassMethods

Defined in:
lib/manticore/facade.rb

Instance Method Summary collapse

Instance Method Details

#include_http_client(options = {}, &block) ⇒ Object

Adds basic synchronous Manticore::Client functionality to the receiver.

Parameters:

  • options (defaults to: {})

    Hash Options to be passed to the underlying shared client, if it has not been created yet.

Returns:

  • nil



26
27
28
29
30
31
32
33
# File 'lib/manticore/facade.rb', line 26

def include_http_client(options = {}, &block)
  @__manticore_facade_options = [options, block]
  class << self
    extend Forwardable
    def_delegators "__manticore_facade", :get, :head, :put, :post, :delete, :options, :patch, :http
  end
  nil
end