Class: JWTSignedRequest::Headers

Inherits:
Object
  • Object
show all
Defined in:
lib/jwt_signed_request/headers.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(request) ⇒ Headers

Returns a new instance of Headers.



17
18
19
# File 'lib/jwt_signed_request/headers.rb', line 17

def initialize(request)
  @request = request
end

Class Method Details

.fetch(key, request) ⇒ Object



13
14
15
# File 'lib/jwt_signed_request/headers.rb', line 13

def self.fetch(key, request)
  new(request).fetch(key)
end

Instance Method Details

#fetch(key) ⇒ Object



21
22
23
24
# File 'lib/jwt_signed_request/headers.rb', line 21

def fetch(key)
  env_key = env_name(key)
  request_env[env_key]
end