Class: Twitter::Request::Gateway
- Inherits:
-
Faraday::Middleware
- Object
- Faraday::Middleware
- Twitter::Request::Gateway
- Defined in:
- lib/twitter/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.
14 15 16 |
# File 'lib/twitter/request/gateway.rb', line 14 def initialize(app, gateway) @app, @gateway = app, gateway end |
Instance Method Details
#call(env) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/twitter/request/gateway.rb', line 7 def call(env) url = env[:url].dup url.host = @gateway env[:url] = url @app.call(env) end |