Module: Emque::Consuming::Actor

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(descendant) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'lib/emque/consuming/actor.rb', line 4

def self.included(descendant)
  descendant.class_eval do
    include Celluloid
    include Emque::Consuming::Helpers
    attr_accessor :shutdown
    private :shutdown=
    private :shutdown
  end
end

Instance Method Details

#stop(&block) ⇒ Object



14
15
16
17
18
# File 'lib/emque/consuming/actor.rb', line 14

def stop(&block)
  self.shutdown = true
  block.call if block_given?
  terminate
end