Class: Faraday::Adapter::Typhoeus
- Inherits:
-
Faraday::Adapter
- Object
- Faraday::Adapter
- Faraday::Adapter::Typhoeus
- Defined in:
- lib/typhoeus/adapters/faraday.rb
Overview
Adapter to use Faraday with Typhoeus.
Class Method Summary collapse
-
.setup_parallel_manager(options = {}) ⇒ Typhoeus::Hydra
Setup Hydra with provided options.
Instance Method Summary collapse
-
#call(env) ⇒ void
Hook into Faraday and perform the request with Typhoeus.
-
#initialize(app, adapter_options = {}) ⇒ void
constructor
Initialize the Typhoeus adapter.
Constructor Details
#initialize(app, adapter_options = {}) ⇒ void
Initialize the Typhoeus adapter
44 45 46 47 |
# File 'lib/typhoeus/adapters/faraday.rb', line 44 def initialize(app, = {}) super(app) @adapter_options = end |
Class Method Details
.setup_parallel_manager(options = {}) ⇒ Typhoeus::Hydra
Setup Hydra with provided options.
59 60 61 |
# File 'lib/typhoeus/adapters/faraday.rb', line 59 def self.setup_parallel_manager( = {}) ::Typhoeus::Hydra.new() end |
Instance Method Details
#call(env) ⇒ void
This method returns an undefined value.
Hook into Faraday and perform the request with Typhoeus.
70 71 72 73 74 |
# File 'lib/typhoeus/adapters/faraday.rb', line 70 def call(env) super perform_request env @app.call env end |