Class: Yarn::Worker

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(handler) ⇒ Worker

Returns a new instance of Worker.



10
11
12
# File 'lib/yarn/worker.rb', line 10

def initialize(handler)
  @handler = handler
end

Instance Attribute Details

#handlerObject (readonly)

include Celluloid



8
9
10
# File 'lib/yarn/worker.rb', line 8

def handler
  @handler
end

Instance Method Details

#process(session) ⇒ Object



14
15
16
# File 'lib/yarn/worker.rb', line 14

def process(session)
  @handler.run session
end