Class: Dwf::Configuration
- Inherits:
-
Object
- Object
- Dwf::Configuration
- Defined in:
- lib/dwf/configuration.rb
Constant Summary collapse
- NAMESPACE =
'dwf'
- REDIS_OPTS =
{ url: 'redis://localhost:6379' }.freeze
Instance Attribute Summary collapse
-
#namespace ⇒ Object
Returns the value of attribute namespace.
-
#redis_opts ⇒ Object
Returns the value of attribute redis_opts.
Instance Method Summary collapse
-
#initialize(hash = {}) ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize(hash = {}) ⇒ Configuration
Returns a new instance of Configuration.
10 11 12 13 |
# File 'lib/dwf/configuration.rb', line 10 def initialize(hash = {}) @namespace = hash.fetch(:namespace, NAMESPACE) @redis_opts = hash.fetch(:redis_opts, REDIS_OPTS) end |
Instance Attribute Details
#namespace ⇒ Object
Returns the value of attribute namespace.
8 9 10 |
# File 'lib/dwf/configuration.rb', line 8 def namespace @namespace end |
#redis_opts ⇒ Object
Returns the value of attribute redis_opts.
8 9 10 |
# File 'lib/dwf/configuration.rb', line 8 def redis_opts @redis_opts end |