Module: ModernTimes::Base::Worker::ClassMethods

Defined in:
lib/modern_times/base/worker.rb

Instance Method Summary collapse

Instance Method Details

#create_supervisor(manager, worker_options) ⇒ Object



13
14
15
# File 'lib/modern_times/base/worker.rb', line 13

def create_supervisor(manager, worker_options)
  Supervisor.new(manager, self, {}, worker_options)
end

#default_nameObject



8
9
10
11
# File 'lib/modern_times/base/worker.rb', line 8

def default_name
  name = self.name.sub(/Worker$/, '')
  name.sub(/::/, '_')
end