Class: Thronglets::Worker

Inherits:
Object
  • Object
show all
Defined in:
lib/thronglets/worker.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeWorker

Returns a new instance of Worker.



11
12
13
14
# File 'lib/thronglets/worker.rb', line 11

def initialize
  @loader = Thronglets::Loader.new
  loader.load
end

Instance Attribute Details

#loaderObject (readonly)

Returns the value of attribute loader.



9
10
11
# File 'lib/thronglets/worker.rb', line 9

def loader
  @loader
end

Instance Method Details

#runObject



16
17
18
19
# File 'lib/thronglets/worker.rb', line 16

def run
  registry.load!
  worker.start # runs forever
end