Class: Yarn::Worker
- Inherits:
-
Object
- Object
- Yarn::Worker
- Defined in:
- lib/yarn/worker.rb
Instance Attribute Summary collapse
-
#handler ⇒ Object
readonly
include Celluloid.
Instance Method Summary collapse
-
#initialize(handler) ⇒ Worker
constructor
A new instance of Worker.
- #process(session) ⇒ Object
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
#handler ⇒ Object (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 |