Class: Quiq::Config

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/quiq/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#loggerObject



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

#pathObject (readonly)

Returns the value of attribute path.



11
12
13
# File 'lib/quiq/config.rb', line 11

def path
  @path
end

#queuesObject (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 parse_options(path:, queues:, log_level:)
  @path = path
  @queues = queues
  @log_level = log_level
end

#redisObject



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