Class: BackgroundQueue::ServerLib::Worker
- Inherits:
-
Object
- Object
- BackgroundQueue::ServerLib::Worker
- Defined in:
- lib/background_queue/server_lib/worker.rb
Overview
this is a worker which keeps track of how many connections are getting used by the worker.
Instance Attribute Summary collapse
-
#connections ⇒ Object
Returns the value of attribute connections.
-
#offline ⇒ Object
Returns the value of attribute offline.
-
#uri ⇒ Object
Returns the value of attribute uri.
Instance Method Summary collapse
-
#initialize(uri) ⇒ Worker
constructor
A new instance of Worker.
- #offline? ⇒ Boolean
Constructor Details
#initialize(uri) ⇒ Worker
Returns a new instance of Worker.
8 9 10 11 12 |
# File 'lib/background_queue/server_lib/worker.rb', line 8 def initialize(uri) @uri = uri @connections = 0 @offline = false end |
Instance Attribute Details
#connections ⇒ Object
Returns the value of attribute connections.
5 6 7 |
# File 'lib/background_queue/server_lib/worker.rb', line 5 def connections @connections end |
#offline ⇒ Object
Returns the value of attribute offline.
6 7 8 |
# File 'lib/background_queue/server_lib/worker.rb', line 6 def offline @offline end |
#uri ⇒ Object
Returns the value of attribute uri.
4 5 6 |
# File 'lib/background_queue/server_lib/worker.rb', line 4 def uri @uri end |
Instance Method Details
#offline? ⇒ Boolean
14 15 16 |
# File 'lib/background_queue/server_lib/worker.rb', line 14 def offline? @offline end |