Class: Unrestful::Config
- Inherits:
-
Object
- Object
- Unrestful::Config
- Defined in:
- lib/unrestful.rb
Instance Method Summary collapse
- #audience ⇒ Object
- #audience=(value) ⇒ Object
-
#initialize(options) ⇒ Config
constructor
A new instance of Config.
- #issuer ⇒ Object
- #issuer=(value) ⇒ Object
- #redis_address ⇒ Object
- #redis_address=(value) ⇒ Object
Constructor Details
#initialize(options) ⇒ Config
Returns a new instance of Config.
17 18 19 |
# File 'lib/unrestful.rb', line 17 def initialize() @options = end |
Instance Method Details
#audience ⇒ Object
29 30 31 |
# File 'lib/unrestful.rb', line 29 def audience @options[:audience] || ENV.fetch("AUDIENCE") end |
#audience=(value) ⇒ Object
33 34 35 |
# File 'lib/unrestful.rb', line 33 def audience=(value) @options[:audience] = value end |
#issuer ⇒ Object
21 22 23 |
# File 'lib/unrestful.rb', line 21 def issuer @options[:issuer] || ENV.fetch("ISSUER") end |
#issuer=(value) ⇒ Object
25 26 27 |
# File 'lib/unrestful.rb', line 25 def issuer=(value) @options[:issuer] = value end |
#redis_address ⇒ Object
37 38 39 |
# File 'lib/unrestful.rb', line 37 def redis_address @options[:redis_address] || ENV.fetch("REDIS_URL") {"redis://localhost:6379/1"} end |
#redis_address=(value) ⇒ Object
41 42 43 |
# File 'lib/unrestful.rb', line 41 def redis_address=(value) @options[:redis_address] = value end |