Module: Manticore::Facade::ClassMethods
- Defined in:
- lib/manticore/facade.rb
Instance Method Summary collapse
-
#include_http_client(options = {}, &block) ⇒ Object
Adds basic synchronous Manticore::Client functionality to the receiver.
Instance Method Details
#include_http_client(options = {}, &block) ⇒ Object
Adds basic synchronous Manticore::Client functionality to the receiver.
26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/manticore/facade.rb', line 26 def include_http_client( = {}, &block) if shared_pool = .delete(:shared_pool) @manticore_facade = Manticore.instance_variable_get("@manticore_facade") else @manticore_facade = Manticore::Client.new(, &block) end class << self extend Forwardable def_delegators "@manticore_facade", :get, :head, :put, :post, :delete, :options, :patch end nil end |