Class: Rottweiler::Configuration
- Inherits:
-
Object
- Object
- Rottweiler::Configuration
- Defined in:
- lib/rottweiler/configuration.rb
Overview
‘Configuration` class allows to store and retrieve current Rottweiler configuration.
Instance Attribute Summary collapse
-
#jwt ⇒ Object
readonly
Returns the value of attribute jwt.
-
#token_header ⇒ Object
Returns the value of attribute token_header.
-
#token_param ⇒ Object
Returns the value of attribute token_param.
-
#unauthorized_status ⇒ Object
Returns the value of attribute unauthorized_status.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
20 21 22 23 24 25 |
# File 'lib/rottweiler/configuration.rb', line 20 def initialize @token_header = 'Authorization' @token_param = [:token] @unauthorized_status = :unauthorized @jwt = Configs::JWT.new end |
Instance Attribute Details
#jwt ⇒ Object (readonly)
Returns the value of attribute jwt.
18 19 20 |
# File 'lib/rottweiler/configuration.rb', line 18 def jwt @jwt end |
#token_header ⇒ Object
Returns the value of attribute token_header.
16 17 18 |
# File 'lib/rottweiler/configuration.rb', line 16 def token_header @token_header end |
#token_param ⇒ Object
Returns the value of attribute token_param.
16 17 18 |
# File 'lib/rottweiler/configuration.rb', line 16 def token_param @token_param end |
#unauthorized_status ⇒ Object
Returns the value of attribute unauthorized_status.
16 17 18 |
# File 'lib/rottweiler/configuration.rb', line 16 def @unauthorized_status end |
Class Method Details
.instance ⇒ Object
8 9 10 |
# File 'lib/rottweiler/configuration.rb', line 8 def self.instance @instance ||= Configuration.new end |
.reset! ⇒ Object
12 13 14 |
# File 'lib/rottweiler/configuration.rb', line 12 def self.reset! @instance = Configuration.new end |