Class: Dwf::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/dwf/configuration.rb

Constant Summary collapse

NAMESPACE =
'dwf'
REDIS_OPTS =
{ url: 'redis://localhost:6379' }.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#namespaceObject

Returns the value of attribute namespace.



8
9
10
# File 'lib/dwf/configuration.rb', line 8

def namespace
  @namespace
end

#redis_optsObject

Returns the value of attribute redis_opts.



8
9
10
# File 'lib/dwf/configuration.rb', line 8

def redis_opts
  @redis_opts
end