mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Allow delay of any module class method
This commit is contained in:
parent
729321b1fe
commit
8657aea37a
2 changed files with 10 additions and 1 deletions
|
@ -30,4 +30,4 @@ module Sidekiq
|
|||
end
|
||||
end
|
||||
|
||||
Class.send(:include, Sidekiq::Extensions::Klass)
|
||||
Module.send(:include, Sidekiq::Extensions::Klass)
|
||||
|
|
|
@ -63,5 +63,14 @@ class TestExtensions < MiniTest::Unit::TestCase
|
|||
it 'allows delay of any ole class method' do
|
||||
SomeClass.delay.doit(Date.today)
|
||||
end
|
||||
|
||||
module SomeModule
|
||||
def self.doit(arg)
|
||||
end
|
||||
end
|
||||
|
||||
it 'allows delay of any module class method' do
|
||||
SomeModule.delay.doit(Date.today)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue