Class: PushbulletRuby::Authorization

Inherits:
Faraday::Request::Authorization
  • Object
show all
Defined in:
lib/pushbullet_ruby/authorization.rb

Instance Method Summary collapse

Instance Method Details

#call(env) ⇒ Object



3
4
5
6
7
8
# File 'lib/pushbullet_ruby/authorization.rb', line 3

def call(env)
  if env.url.to_s.match(PushbulletRuby::Client::URL)
    env.request_headers[KEY] = @header_value
  end
  @app.call env
end