Class: MailRoom::Delivery::Sidekiq::Options

Inherits:
Struct
  • Object
show all
Defined in:
lib/mail_room/delivery/sidekiq.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(mailbox) ⇒ Options

Returns a new instance of Options.


12
13
14
15
16
17
18
19
20
21
# File 'lib/mail_room/delivery/sidekiq.rb', line 12

def initialize(mailbox)
  redis_url = mailbox.delivery_options[:redis_url] || "redis://localhost:6379"
  namespace = mailbox.delivery_options[:namespace]
  sentinels = mailbox.delivery_options[:sentinels]
  queue     = mailbox.delivery_options[:queue] || "default"
  worker    = mailbox.delivery_options[:worker]
  logger = mailbox.logger

  super(redis_url, namespace, sentinels, queue, worker, logger)
end

Instance Attribute Details

#loggerObject

Returns the value of attribute logger

Returns:

  • (Object)

    the current value of logger


11
12
13
# File 'lib/mail_room/delivery/sidekiq.rb', line 11

def logger
  @logger
end

#namespaceObject

Returns the value of attribute namespace

Returns:

  • (Object)

    the current value of namespace


11
12
13
# File 'lib/mail_room/delivery/sidekiq.rb', line 11

def namespace
  @namespace
end

#queueObject

Returns the value of attribute queue

Returns:

  • (Object)

    the current value of queue


11
12
13
# File 'lib/mail_room/delivery/sidekiq.rb', line 11

def queue
  @queue
end

#redis_urlObject

Returns the value of attribute redis_url

Returns:

  • (Object)

    the current value of redis_url


11
12
13
# File 'lib/mail_room/delivery/sidekiq.rb', line 11

def redis_url
  @redis_url
end

#sentinelsObject

Returns the value of attribute sentinels

Returns:

  • (Object)

    the current value of sentinels


11
12
13
# File 'lib/mail_room/delivery/sidekiq.rb', line 11

def sentinels
  @sentinels
end

#workerObject

Returns the value of attribute worker

Returns:

  • (Object)

    the current value of worker


11
12
13
# File 'lib/mail_room/delivery/sidekiq.rb', line 11

def worker
  @worker
end