Class: Autoscale::Agent::WorkerServer

Inherits:
Object
  • Object
show all
Defined in:
lib/autoscale/agent/worker_server.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#tokenObject (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

#serveObject



11
12
13
# File 'lib/autoscale/agent/worker_server.rb', line 11

def serve
  @block.call
end