Class: Quiq::Config
Instance Attribute Summary collapse
- #logger ⇒ Object
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#queues ⇒ Object
readonly
Returns the value of attribute queues.
Instance Method Summary collapse
Instance Attribute Details
#logger ⇒ Object
22 23 24 25 26 27 |
# File 'lib/quiq/config.rb', line 22 def logger @logger ||= begin level = @log_level || Logger::DEBUG ::Logger.new(STDOUT, level: level) end end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
11 12 13 |
# File 'lib/quiq/config.rb', line 11 def path @path end |
#queues ⇒ Object (readonly)
Returns the value of attribute queues.
11 12 13 |
# File 'lib/quiq/config.rb', line 11 def queues @queues end |
Instance Method Details
#parse_options(path:, queues:, log_level:) ⇒ Object
29 30 31 32 33 |
# File 'lib/quiq/config.rb', line 29 def (path:, queues:, log_level:) @path = path @queues = queues @log_level = log_level end |
#redis ⇒ Object
18 19 20 |
# File 'lib/quiq/config.rb', line 18 def redis @redis ||= Redis.new end |
#redis=(server) ⇒ Object
14 15 16 |
# File 'lib/quiq/config.rb', line 14 def redis=(server) @redis = Redis.new(server) end |