Class: ActiveHook::BaseConfig
- Inherits:
-
Object
- Object
- ActiveHook::BaseConfig
- Defined in:
- lib/activehook/config.rb
Direct Known Subclasses
Constant Summary collapse
- BASE_DEFAULTS =
{ redis_url: ENV['REDIS_URL'], redis_pool: 5, signature_header: 'X-Webhook-Signature' }.freeze
Instance Attribute Summary collapse
-
#redis_pool ⇒ Object
Returns the value of attribute redis_pool.
-
#redis_url ⇒ Object
Returns the value of attribute redis_url.
-
#signature_header ⇒ Object
Returns the value of attribute signature_header.
Instance Method Summary collapse
-
#initialize ⇒ BaseConfig
constructor
A new instance of BaseConfig.
- #redis ⇒ Object
Constructor Details
#initialize ⇒ BaseConfig
Returns a new instance of BaseConfig.
37 38 39 |
# File 'lib/activehook/config.rb', line 37 def initialize BASE_DEFAULTS.each { |key, value| send("#{key}=", value) } end |
Instance Attribute Details
#redis_pool ⇒ Object
Returns the value of attribute redis_pool.
35 36 37 |
# File 'lib/activehook/config.rb', line 35 def redis_pool @redis_pool end |
#redis_url ⇒ Object
Returns the value of attribute redis_url.
35 36 37 |
# File 'lib/activehook/config.rb', line 35 def redis_url @redis_url end |
#signature_header ⇒ Object
Returns the value of attribute signature_header.
35 36 37 |
# File 'lib/activehook/config.rb', line 35 def signature_header @signature_header end |
Instance Method Details
#redis ⇒ Object
41 42 43 44 45 46 |
# File 'lib/activehook/config.rb', line 41 def redis { size: redis_pool, url: redis_url } end |