Class: Sinatra::Jwt::JwkLoader::String
- Defined in:
- lib/sinatra/jwt/jwk_loader.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
Instance Method Summary collapse
-
#initialize(content = nil) ⇒ String
constructor
A new instance of String.
- #load ⇒ Object
Methods inherited from Loader
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
#content ⇒ Object (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
#load ⇒ Object
46 47 48 |
# File 'lib/sinatra/jwt/jwk_loader.rb', line 46 def load JSON.parse(content) end |