Class: Autoscale::Agent::WorkerServer
- Inherits:
-
Object
- Object
- Autoscale::Agent::WorkerServer
- Defined in:
- lib/autoscale/agent/worker_server.rb
Instance Attribute Summary collapse
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
-
#initialize(token, &block) ⇒ WorkerServer
constructor
A new instance of WorkerServer.
- #serve ⇒ Object
Constructor Details
#initialize(token, &block) ⇒ WorkerServer
Returns a new instance of WorkerServer.
6 7 8 9 |
# File 'lib/autoscale/agent/worker_server.rb', line 6 def initialize(token, &block) @token = token @block = block end |
Instance Attribute Details
#token ⇒ Object (readonly)
Returns the value of attribute token.
4 5 6 |
# File 'lib/autoscale/agent/worker_server.rb', line 4 def token @token end |
Instance Method Details
#serve ⇒ Object
11 12 13 |
# File 'lib/autoscale/agent/worker_server.rb', line 11 def serve @block.call end |