Class: Sidekiq::Superworker::Worker

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

Class Method Summary collapse

Class Method Details

.create(*args, &block) ⇒ Object

Raises:

  • (NoMethodError)


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

def self.create(*args, &block)
  raise NoMethodError.new("Superworker.create has been replaced by Superworker.define.\nPlease see 'Upgrading to 1.x' at https://github.com/socialpandas/sidekiq-superworker.\nSuperworker.create called at #{caller[0]}")
end

.define(*args, &block) ⇒ Object



4
5
6
7
8
# File 'lib/sidekiq/superworker/worker.rb', line 4

def self.define(*args, &block)
  class_name = args.shift.to_sym
  nested_hash = DSLParser.new.parse(block)
  define_class(class_name, args, nested_hash)
end