Class: RockQueue::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/rock-queue/config.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#adapterObject

Returns the value of attribute adapter.



4
5
6
# File 'lib/rock-queue/config.rb', line 4

def adapter
  @adapter
end

#hostObject

Returns the value of attribute host.



4
5
6
# File 'lib/rock-queue/config.rb', line 4

def host
  @host
end

#logObject

Returns the value of attribute log.



4
5
6
# File 'lib/rock-queue/config.rb', line 4

def log
  @log
end

#portObject

Returns the value of attribute port.



4
5
6
# File 'lib/rock-queue/config.rb', line 4

def port
  @port
end

Class Method Details

.instanceObject

Return the instance



7
8
9
# File 'lib/rock-queue/config.rb', line 7

def self.instance
  @__instance__ ||= new
end

.settingsObject

Yields a singleton instance of RockQueue::Config so you can specify config information like server address, port etc.



13
14
15
16
17
18
19
# File 'lib/rock-queue/config.rb', line 13

def self.settings
  if block_given?
    yield self.instance
  else
    self.instance
  end
end

Instance Method Details

#notifiersObject



21
22
23
24
25
26
27
# File 'lib/rock-queue/config.rb', line 21

def notifiers
  if block_given?
    yield Notifiers.instance
  else
    Notifiers.instance
  end
end