Class: Sinatra::Jwt::JwkLoader::String

Inherits:
Loader
  • Object
show all
Defined in:
lib/sinatra/jwt/jwk_loader.rb

Direct Known Subclasses

EnvString

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Loader

#call

Constructor Details

#initialize(content = nil) ⇒ String

Returns a new instance of String.



41
42
43
44
# File 'lib/sinatra/jwt/jwk_loader.rb', line 41

def initialize(content = nil)
  @content = content || "{}"
  super()
end

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content.



39
40
41
# File 'lib/sinatra/jwt/jwk_loader.rb', line 39

def content
  @content
end

Instance Method Details

#loadObject



46
47
48
# File 'lib/sinatra/jwt/jwk_loader.rb', line 46

def load
  JSON.parse(content)
end