Class: Faraday::Request::TinderbOauth2
- Inherits:
-
Middleware
- Object
- Middleware
- Faraday::Request::TinderbOauth2
- Defined in:
- lib/tinderb/request.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, token) ⇒ TinderbOauth2
constructor
A new instance of TinderbOauth2.
Constructor Details
#initialize(app, token) ⇒ TinderbOauth2
Returns a new instance of TinderbOauth2.
9 10 11 12 |
# File 'lib/tinderb/request.rb', line 9 def initialize(app, token) @app = app @token = token end |
Instance Method Details
#call(env) ⇒ Object
14 15 16 17 |
# File 'lib/tinderb/request.rb', line 14 def call(env) env[:request_headers]['X-Auth-Token'] ||= @token @app.call(env) end |