Class: MailRoom::Arbitration::Redis::Options

Inherits:
Struct
  • Object
show all
Defined in:
lib/mail_room/arbitration/redis.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(mailbox) ⇒ Options

Returns a new instance of Options.


7
8
9
10
11
12
13
# File 'lib/mail_room/arbitration/redis.rb', line 7

def initialize(mailbox)
  redis_url = mailbox.arbitration_options[:redis_url] || "redis://localhost:6379"
  namespace = mailbox.arbitration_options[:namespace]
  sentinels = mailbox.arbitration_options[:sentinels]

  super(redis_url, namespace, sentinels)
end

Instance Attribute Details

#namespaceObject

Returns the value of attribute namespace

Returns:

  • (Object)

    the current value of namespace


6
7
8
# File 'lib/mail_room/arbitration/redis.rb', line 6

def namespace
  @namespace
end

#redis_urlObject

Returns the value of attribute redis_url

Returns:

  • (Object)

    the current value of redis_url


6
7
8
# File 'lib/mail_room/arbitration/redis.rb', line 6

def redis_url
  @redis_url
end

#sentinelsObject

Returns the value of attribute sentinels

Returns:

  • (Object)

    the current value of sentinels


6
7
8
# File 'lib/mail_room/arbitration/redis.rb', line 6

def sentinels
  @sentinels
end