Class: Conquer::Segment::Worker

Inherits:
Object
  • Object
show all
Includes:
Celluloid, Celluloid::Notifications
Defined in:
lib/conquer/segment.rb

Constant Summary collapse

DRIFT =
100.milliseconds.freeze

Instance Method Summary collapse

Constructor Details

#initialize(topic, interval, block) ⇒ Worker

Returns a new instance of Worker.



13
14
15
16
17
18
19
# File 'lib/conquer/segment.rb', line 13

def initialize(topic, interval, block)
  @topic = topic
  @interval = interval
  @block = wrapped_proc(block)

  async.run
end