Class: AngellistApi::Request::Gateway
- Inherits:
-
Faraday::Middleware
- Object
- Faraday::Middleware
- AngellistApi::Request::Gateway
- Defined in:
- lib/angellist_api/request/gateway.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, gateway) ⇒ Gateway
constructor
A new instance of Gateway.
Constructor Details
#initialize(app, gateway) ⇒ Gateway
Returns a new instance of Gateway.
13 14 15 |
# File 'lib/angellist_api/request/gateway.rb', line 13 def initialize(app, gateway) @app, @gateway = app, gateway end |
Instance Method Details
#call(env) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/angellist_api/request/gateway.rb', line 6 def call(env) url = env[:url].dup url.host = @gateway env[:url] = url @app.call(env) end |