Class: RockQueue::Config
- Inherits:
-
Object
- Object
- RockQueue::Config
- Defined in:
- lib/rock-queue/config.rb
Instance Attribute Summary collapse
-
#adapter ⇒ Object
Returns the value of attribute adapter.
-
#host ⇒ Object
Returns the value of attribute host.
-
#log ⇒ Object
Returns the value of attribute log.
-
#port ⇒ Object
Returns the value of attribute port.
Class Method Summary collapse
-
.instance ⇒ Object
Return the instance.
-
.settings ⇒ Object
Yields a singleton instance of RockQueue::Config so you can specify config information like server address, port etc.
Instance Method Summary collapse
Instance Attribute Details
#adapter ⇒ Object
Returns the value of attribute adapter.
4 5 6 |
# File 'lib/rock-queue/config.rb', line 4 def adapter @adapter end |
#host ⇒ Object
Returns the value of attribute host.
4 5 6 |
# File 'lib/rock-queue/config.rb', line 4 def host @host end |
#log ⇒ Object
Returns the value of attribute log.
4 5 6 |
# File 'lib/rock-queue/config.rb', line 4 def log @log end |
#port ⇒ Object
Returns the value of attribute port.
4 5 6 |
# File 'lib/rock-queue/config.rb', line 4 def port @port end |
Class Method Details
.instance ⇒ Object
Return the instance
7 8 9 |
# File 'lib/rock-queue/config.rb', line 7 def self.instance @__instance__ ||= new end |
.settings ⇒ Object
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 |